Required Hardware
Surprisingly, there’s not a lot of hardware required.
A lot of the magic is contained within the Plant Monitor.
You really only need a few items to get started.
A web server will be required to serve up a simple webpage accessible within your home internet connection.
There are different model versions of the Raspberry Pi Pico.
First, let’s ensure that the plant monitor is connected and working properly.
The Monk Makes Plant Monitor is a nice option as it is not prone to corrode in soil.
Not only does this monitor measure soil wetness, but it also measures humidity and temperature too.
You’ll notice some lights on the hardware that confirm the gadget is in working order.
you might grab the following python files from ourMUO GitHub repository.
The python file,pmon.py, creates a MicroPython Class for the plant monitor.
You’ll also notice thewetness,temp, andhumidityfunctions being defined in this file as well.
Next, you’ll need thetest.pyfile obtained from ourMUO GitHub repository.
As thePlantMonitormodule is imported, all that’s required to monitor soil conditions is a simple while loop.
Also, theprintcommand will output the soil moisture, temperature, and humidity readouts after runningtest.pyin Thonny.
Don’t feel like watering your plant when the soil is too dry?
You’ll either receive an IP address of your Raspberry Pi Pico and a connected message.
If the connection was not successful, you’ll receive a connection failed message instead.
At the very bottom of this file, you may also customize the port as well.
This is handy if you wish to expose this information to the internet outside your home.
When you run yourtest.pyfile, the required server python files (mm_wlanandpico_w_server) are imported for you.
Feel free to tweak the code as you see fit.
Now you’ll be able to forever maintain your ‘green thumb’ status.