Note to self so I remember how to run this in a few years when I revisit it:
-
Connect the things with the stuff so it works.
-
Install micropython firmware.
-
Create a config.py file in
src/config
based on theconfig_example.py
. -
Configure the config file.
-
Copy the src folder to the device. You can use ampy to do this:
ampy --port COM3 put src
-
Configure the
main.py
located in the root directory. Create someSmartPumps
, put theM in theIrrigationSystem
and call start monitoring, maybe. 7. Upload youmain.py
file to the microcontroller (tested on ESP32) and restart. It will now run every time you start the microcontroller.
Note: I used influxdb v1.8 since I host it on a Raspberry Pi with a 32 bit OS that does not support InfluxDB v2.0+. Don't know if the logger will work for v2.0+. :)
Based on uftpd.
- Connect to the device via webrepl (IP for me
ws://192.168.50.43:8266
) - Stop the current program by pressing ctrl-c
- Execute the following command to start the ftp server:
import uftpd
- Connect to the ftp server, e.g., via WinSCP. Device IP as hostname and port 21. Anonymous login since credentials are not supported.
- Upload the new files
- Press ctrl-d in webrepl to reboot the device