https://github.com/irahorecka/soil-moisture-display
Transmit soil moisture status via Raspberry Pi
https://github.com/irahorecka/soil-moisture-display
gpio raspberry-pi rpi3 soil-moisture-sensor
Last synced: 2 months ago
JSON representation
Transmit soil moisture status via Raspberry Pi
- Host: GitHub
- URL: https://github.com/irahorecka/soil-moisture-display
- Owner: irahorecka
- License: mit
- Created: 2021-01-17T00:00:47.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-01-31T15:33:35.000Z (5 months ago)
- Last Synced: 2026-02-01T03:31:24.382Z (5 months ago)
- Topics: gpio, raspberry-pi, rpi3, soil-moisture-sensor
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
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:
.. code::
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.
.. code:: python
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
----------
- `Issues Tracker `__
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.