#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
 
 #Install Node-Red
 cd
 sudo apt-get install build-essential
 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
 sudo apt-get remove vlc*
 sudo apt-get update -y && sudo apt-get upgrade -y
 sudo apt-get install build-essential cmake pkg-config
 sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
 sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
 sudo apt-get install libxvidcore-dev libx264-dev
 sudo apt-get install libgtk2.0-dev
 sudo apt-get install libatlas-base-dev gfortran
 sudo apt-get install python2.7-dev python3-dev
 sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng-dev
 sudo apt-get install libfontconfig1-dev libcairo2-dev
 sudo apt-get install libgdk-pixbuf2.0-dev libpango1.0-dev
 sudo apt-get install libgtk2.0-dev libgtk-3-dev
 sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-103
 sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
 pip install "picamera[array]"
 pip3 install opencv-contrib-python==4.1.0.25
 
 sudo apt-get install ffmpeg git python3-picamera python3-ws4py
 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