Laceleaf / PiIrrigationSystem

Code for an automated irrigation system using a Raspberry Pi.
0 stars 0 forks source link

PiIrrigationSystem

Irrigation System Overview:

abstraktSystem

Irrigation System Code Structure:

software

Software Guide:

Raspberry Pi Module 4 B with Raspberry Pi OS (32-bit), Version 11 Bullseye Python-Version: 3.9.2

Python Modules needed:

  1. Adafruit CircuitPython
  2. Adafruit CircuitPython seesaw
  3. Blinka
  4. SQLlite3
  5. Flask
  6. Adafruit_CircuitPython_TSL2591
  7. Adafruit_CircuitPython_SHT4x
  8. Picamera (should be installed but check)

Code Execution:

With time and changes to code, the names in the python scripts shown in the code structure diagram have changed slightly. To execute the system, run the script in following order via Raspberry Pi terminal (except when a path is specified):

  1. Not completely necessary but recommended to have a plant in database to work with: python3 plantprofiles.py IT IS NOT recommended to change the database name because it is referenced in the different scripts but you will have to change your database path in the method create_connection()
  2. python3 irrigation.py Again, please keep the database name but the path must be adapted to your own system
  3. python3 wateringLoop.py script runs in loop but can be interrupted by keyboard interrupt (sometimes it needs to be done twice)
  4. Switch to the directory web and then execute the script with sudo: sudo python3 irrigation_web.py

    Help with setting up the sensors used: Adafruit STEMMA Soil Sensor TSL2591 Light Sensor SHT40 Temperatur (and humidity) Sensor Waterpump (DC) with 5 Volt Relay and 12 Volt power supply

    SensorenaufbauInstallationshilfe