Skip to content

irahorecka/soil-moisture-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soil-moisture-display

A Raspberry Pi project to detect and display my plants' soil moisture (image). My project is configured for the Raspberry Pi 3B+ using Python 3.7.3.

Running the application

It's as simple as cloning this repository and running:

pip3 install -r requirements.txt

python3 main.py

API

This project is designed to provide a fairly simple API out of the box.

For example, let's set up this instance:
  1. We want to set up 5 soil moisture sensors
  2. We want these sensors to have callback (i.e. notify in real-time when soil moisture changes)
  3. We want to display this information on a 16x2 I2C LCD display.
from soil import Soil, lcd
import time

# gpio channel: plant name
plant_map = {
    16: "Peace Lily",
    19: "Prls/Jade Pothos",
    20: "Calathea Mdln",
    21: "Micans Pothos",
    26: "Golden Pothos",
}
my_plants = Soil(plant_map)
my_plants.setup(callback=True, display="lcd")

if __name__ == "__main__":
    try:
        # let's display a welcome message for 5 seconds
        lcd.display("Let's detect", "soil moisture!", duration=5)
        while True:
            time.sleep(1)
    except KeyboardInterrupt:
        # clean up GPIO channels on application exit
        my_plants.cleanup()

Hardware

The bare minimum hardware to run the example above are:
  1. Raspberry Pi 3B+
  2. Soil Moisture Sensor
  3. 16x2 I2C LCD Display
  4. Jumper Wires
  5. Bread Board

Useful Resources

Listed are resources I found useful in setting up hardware:
  1. Wiring 16x2 I2C LCD Display
  2. Setting up soil moisture sensors w/ RPi

Contribute

Support

If you are having issues or would like to propose a new feature, please use the issues tracker.

License

This project is licensed under the MIT license.

About

Transmit soil moisture status via Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published