Previous Blog Posts
Blog 1 - Challenge Overview + Plant Growth Factors
Blog 2 - Plant Growth Chamber Design
Blog 3 - The Project Plan + Prototype Materials
Blog 4 - Automation Using The Challenger Kit
Blog 5 - Enclosure Prototype + Light/Air/Temperature
Blog 6 - Plant Pot System + Assembly
Raspberry Pi Setup
Here's a great video by Crosstalk Solutions that shows how to set up the Raspberry Pi. Watch from start up to 21:20 for Pi configuration and SSH setup. Download SSH client PuTTY via the official website.
For this project, I'll connect to the Pi from my Windows laptop via SSH. The IP address of the Pi can be found by simply typing 'hostname -I' in the Pi Terminal. In the Windows Command Prompt, type:
ssh pi@insert_your_ip_address
It then asks for a password, which is "raspberry" by default. Type the password, then press 'Enter'. After successfully connecting, the Command Prompt should display:
pi@raspberrypi:~ $
Now that the Pi setup is complete, I can now integrate the Enviro HAT.
Enviro HAT Setup
The Enviro HAT is an attachment that perfectly snaps onto the Pi pins. It is outfitted with sensors that collect environmental data such as temperature, humidity, and light.
Useful Links
- Enviro HAT Pimoroni product page
- Enviro HAT Pimoroni GitHub examples
- Enviro HAT Pimoroni getting started
Before attaching the Enviro HAT onto the Pi pins, I power off the Pi. This eliminates any possibility of short circuiting the Pi in case if things aren't connected correctly. I'll have to repeat SSH connection, but it's best to be safe.
Starting from where I left off on SSH connection, I install the Enviro Python library provided by Pimoroni. Following the instructions outlined by Pimoroni's Getting Started with Enviro blog, I type the following into the Windows Command Prompt:
git clone https://github.com/pimoroni/enviroplus-python cd enviroplus-python sudo ./install.sh
'git clone' makes a copy of the Enviro HAT Pimoroni GitHub repository for installation. 'cd' changes the current directory to the one stated which is 'enviroplus-python'.
cd examples python3 weather-and-light.py
I'm looking to use one of the examples provided in the GitHub so I 'cd' into 'examples.' I use 'python3' instead of 'python' to run the program because this one in particular requires Python 3.
As we can see, readings may require calibration:
- Temperature | 25°C is quite warm. Heat radiated from the Raspberry Pi CPU increases the actual reading. There is a compensated temperature program that accounts for this.
- Humidity | 64% BAD. I'm not quite sure what qualifies as a BAD humidity. The plants are growing just fine. Perhaps the heat from the Pi affects humidity as well.
- Light | 328 Lux. The Enviro HAT must face towards the light at the same distance as the plants to get the most accurate reading.
Data Collection and Plotting
Light, temperature, and humidity data is good to have for plant growth experiments. I'm able to get real-time light, temperature, and humidity readings on the Enviro HAT screen display, but wouldn't data be more useful if collected and plotted on a graph?
I came across Pimoroni Blog Data Collection, Logging, Plotting & Serving - A Simple Guide. I am currently working on data collection and plotting for temperature, humidity, and light. As soon as I complete those, I will update this section of the blog to include results.
In the next blog, I'll document my Automation HAT setup! Until then, keep learning and have fun! Click the arrow to navigate to the next blog.