mushrooms_firmware
‣畭桳潲浯彳楦浲慷敲�
This repo contains the code needed for our POC project - controlled mushrooms growing environnment. The code is in two parts :
- .ino for arduino code
- .py for raspberry pi code
Setup
In order to get the projet working, you need to :
- Wire all the components together according to the wiring_diagram.png
- Upload the .ino code to the arduino using Arduino software and a computer
- Run raspbian on the raspberry, replace the PORT variable in the mushroom_controller.py file by the accurate value for your setup, and finally run the mushroom_controller.py file with python3.
Arduino Code
The Arduino Code contains four major parts :
- functions to retrieve data from the sensors
- functions to calculate the command using PI blocks
- functions to apply command to the actuators
- a routine to handle serial communication with the raspberry pi
Raspberry pi code
The raspberry pi code contains a library of functions that can be used to communicate with the arduino, parametrize it and retrieve metrics. It also contains a little example script that runs all the functions.