diff --git a/scripts/mqtt_nodered.json b/flows/mqtt_nodered.json similarity index 100% rename from scripts/mqtt_nodered.json rename to flows/mqtt_nodered.json diff --git a/history_working_pi b/history_working_pi deleted file mode 100644 index 7c84a67..0000000 --- a/history_working_pi +++ /dev/null @@ -1,97 +0,0 @@ -#MANUAL CONFIGURATION -#COPY PASTE LINE BY LINE - - #Update and upgrade you Pi - sudo apt-get update -y && sudo apt-get full-upgrade -y - sudo reboot now - - #Configure your Pi - sudo raspi-config - #Interfacing Options > Camera > Yes > OK - #Interfacing Options > SSH > Yes > OK - #Interfacing Options > I2C > Yes > OK - #Interfacing Options > SSH > No > Yes > OK - #Reboot > Yes - - #Install librairies for the steppers (pump and focus) - pip3 install adafruit-blinka - sudo pip3 install adafruit-circuitpython-motorkit - - #Install the librairy for the fan - git clone https://github.com/WiringPi/WiringPi.git - cd WiringPi - sudo ./build - sudo apt-get install gcc -y - - #Install Node-Red - cd - sudo apt-get install build-essential -y - bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) - #Press y and y again to confirm the installation of Node-RED and wait. - - cd .node-red/ - npm install node-red-dashboard - npm install node-red-contrib-python3-function - npm install node-red-contrib-camerapi - npm install node-red-contrib-gpsd - npm install node-red-contrib-web-worldmap - sudo systemctl enable nodered.service - -#BUILD CONFIGURATION -#COPY PASTE BLOCK BY BLOCK - - sudo pip3 install jupyter - pip install matplotlib - pip3 install matplotlib - sudo apt-get install exfat-fuse -y - sudo apt-get install exfat-utils -y - pip install paho-mqtt - pip3 install paho-mqtt - sudo apt-get install mosquitto mosquitto-clients -y - - - - - pip install -U git+https://github.com/morphocut/morphocut.git@pyrocystis - pip3 install -U git+https://github.com/morphocut/morphocut.git@pyrocystis - sudo pip3 install morphocut --upgrade - pip3 install morphocut --upgrade - pip3 uninstall morphocut - pip uninstall morphocut - pip uninstall -U git+https://github.com/morphocut/morphocut.git@pyrocystis - pip freeze | xargs pip uninstall -y - pip3 freeze | xargs pip3 uninstall -y - sudo pip3 freeze | xargs pip3 uninstall -y - pip3 uninstall morphocut - sudo pip3 uninstall morphocut - sudo pip3 install morphocut - sudo pip3 uninstall morphocut - pip install -U git+https://github.com/morphocut/morphocut.git@pyrocystis - pip3 install -U git+https://github.com/morphocut/morphocut.git@pyrocystis - - - sudo apt-get purge wolfram-engine -y - sudo apt-get remove vlc* -y - sudo apt-get update -y && sudo apt-get upgrade -y - sudo apt-get install build-essential cmake pkg-config -y - sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev -y - sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y - sudo apt-get install libxvidcore-dev libx264-dev -y - sudo apt-get install libgtk2.0-dev -y - sudo apt-get install libatlas-base-dev gfortran -y - sudo apt-get install python2.7-dev python3-dev -y - sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng-dev -y - sudo apt-get install libfontconfig1-dev libcairo2-dev -y - sudo apt-get install libgdk-pixbuf2.0-dev libpango1.0-dev -y - sudo apt-get install libgtk2.0-dev libgtk-3-dev -y - sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-103 -y - sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5 -y - pip install "picamera[array]" - pip3 install opencv-contrib-python==4.1.0.25 - - sudo apt-get install ffmpeg git python3-picamera python3-ws4py -y - git clone https://github.com/waveform80/pistreaming.git - git clone git@github.com:Lawouach/WebSocket-for-Python.git - pip install ws4py - pip3 install ws4py - pip3 install pyzmq diff --git a/morphocut/error.txt b/morphocut/error.txt deleted file mode 100644 index 258737d..0000000 --- a/morphocut/error.txt +++ /dev/null @@ -1,72 +0,0 @@ -#test using python3.7 morphocut.py -Processing images under /home/pi/Desktop/PlanktonScope_acquisition/01_16_2020/15... -0it [00:00, ?it/s] -0it [00:00, ?it/s]Found 94 files in /home/pi/Desktop/PlanktonScope_acquisition/01_16_2020/15. - -Object 35_41_180124_84: : 85it [00:17, 5.95it/s] -Frame 35_41_180124: : 1it [00:17, 17.03s/it] -Object 35_41_763395_168: : 169it [00:24, 47.97it/s] -Frame 35_41_763395: : 2it [00:24, 14.11s/it] -Object 35_42_339153_245: : 245it [00:31, 44.73it/s] -Frame 35_42_339153: : 3it [00:31, 11.93s/it] -Object 35_42_899894_320: : 319it [00:38, 42.28it/s] -Frame 35_42_899894: : 4it [00:38, 10.44s/it] -Object 35_43_467613_394: : 394it [00:45, 44.59it/s] -Frame 35_43_467613: : 5it [00:44, 9.36s/it] -Object 35_44_040639_465: : 466it [00:56, 32.28it/s] -Frame 35_44_040639: : 6it [00:59, 9.95s/it] -Object 35_44_040639_465: : 466it [00:59, 7.78it/s] -Traceback (most recent call last): - File "/home/pi/Downloads/Morphocut.py", line 115, in - p.run() - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 748, in run - for _ in self.transform_stream(): - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/stream.py", line 68, in transform_stream - for obj in progress: - File "/home/pi/.local/lib/python3.7/site-packages/tqdm/std.py", line 1104, in __iter__ - for obj in iterable: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/contrib/ecotaxa.py", line 111, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/stream.py", line 184, in transform_stream - for i, obj in enumerate(stream, start=self.start): - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/image.py", line 142, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/stream.py", line 68, in transform_stream - for obj in progress: - File "/home/pi/.local/lib/python3.7/site-packages/tqdm/std.py", line 1104, in __iter__ - for obj in iterable: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 489, in transform_stream - for obj in stream: - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/core.py", line 492, in transform_stream - result = self.transform(*parameters) # pylint: disable=no-member - File "/home/pi/.local/lib/python3.7/site-packages/morphocut/image.py", line 78, in transform - image, in_range=in_range, out_range=self.out_range - File "/home/pi/.local/lib/python3.7/site-packages/skimage/exposure/exposure.py", line 352, in rescale_intensity - image = (image - imin) / float(imax - imin) -MemoryError diff --git a/pipeline/focus.py b/pipeline/focus.py deleted file mode 100644 index 837ec79..0000000 --- a/pipeline/focus.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -from adafruit_motor import stepper -from adafruit_motorkit import MotorKit -from time import sleep - -from thread2 import Thread -import sys - -nb_step = int(sys.argv[1]) -orientation = str(sys.argv[2]) -toogler = str(sys.argv[3]) - - -#Execute a python cmd with the previous defined variables from php - - -kit = MotorKit() - -stage = kit.stepper1 - -stage.release() - -def focus(steps,orientation): - #0.25mm/step - #31um/microsteps - - stage.release() - - if orientation == 'up': - for i in range(steps): - stage.onestep(direction=stepper.FORWARD, style=stepper.MICROSTEP) - sleep(0.001) - - if orientation == 'down': - for i in range(steps): - stage.onestep(direction=stepper.BACKWARD, style=stepper.MICROSTEP) - sleep(0.001) - - stage.release() - -focus_thread = Thread(target = focus, name = 'focus_thread', args =(nb_step, orientation) ) - -if toogler == "ON": - - focus_thread.start() - focus_thread.isAlive() - -if toogler == "OFF": - - focus_thread.terminate() - focus_thread.join() - focus_thread.isAlive() - stage.release() - diff --git a/pipeline/pump.py b/pipeline/pump.py deleted file mode 100644 index 52b0e68..0000000 --- a/pipeline/pump.py +++ /dev/null @@ -1,41 +0,0 @@ -from adafruit_motor import stepper -from adafruit_motorkit import MotorKit -from time import sleep - -import sys - -vol = int(sys.argv[1]) -flowrate = float(sys.argv[2]) -dir = str(sys.argv[3]) - -kit = MotorKit() - -pump_stepper = kit.stepper2 - -pump_stepper.release() - -def pump(vol, flowrate, dir): - - if dir == "foward": - dir=stepper.FORWARD - if dir == "backward": - dir=stepper.BACKWARD - - nb_step=vol*507 #if sleep(0.05) in between 2 steps - #35000steps for 69g - - #nb_step=vol*460 if sleep(0) in between 2 steps - duration=(vol*60)/flowrate - - delay=(duration/nb_step)-0.005 - - for i in range(nb_step): - pump_stepper.onestep(direction=dir, style=stepper.DOUBLE) - sleep(delay) - - sleep(1) - pump_stepper.release() - -#volume, flowrate (from 0 to 20), direction (foward or backward) -pump(vol, flowrate, dir) - diff --git a/pipeline/settings_web_interface.sh b/pipeline/settings_web_interface.sh deleted file mode 100644 index 89dc38d..0000000 --- a/pipeline/settings_web_interface.sh +++ /dev/null @@ -1,9 +0,0 @@ - -cd ~ -sudo touch starting.sh -sudo chmod 777 starting.sh -sudo echo 'sudo chmod 777 /dev/i2c-1' >> starting.sh - -sudo echo './starting.sh' >> .bashrc - -sudo reboot diff --git a/scripts/daemon.zip b/scripts/daemon.zip deleted file mode 100644 index babd17e..0000000 Binary files a/scripts/daemon.zip and /dev/null differ diff --git a/scripts/kill_image.sh b/scripts/kill_image.sh deleted file mode 100644 index 72b021d..0000000 --- a/scripts/kill_image.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -#In order to kill an on going acquisition, type this command -#bash $HOME/PlanktonScope/scripts/kill_image.sh image.py in_path sample_project sample_id acq_id - -path=$1 - -kill -9 `ps ax | grep "image.py" | head -1 | awk '{print $1}'` -kill -9 `ps ax | grep "image.py" | head -1 | awk '{print $1}'` - -rm -r $path diff --git a/scripts/killer.sh b/scripts/killer.sh deleted file mode 100644 index 99fee90..0000000 --- a/scripts/killer.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -#Run this script using this type of command line : bash killer.sh name_of_the_python_script_to_kill.py - -scrip_name=$1 - -kill -9 `ps ax | grep "$scrip_name" | head -1 | awk '{print $1}'` - -python3.7 $HOME/PlanktonScope/scripts/recover.py