In this step you will assemble the hardware, and set up the Pi.
-
Fix the Grove base hat to the pins on the Raspberry Pi, pressing down firmly.
-
Connect the Grove capacitive moisture sensor to socket A2 on the Grove base hat
-
Connect the Grove BME280 Temperature/Pressure/Humidity sensor to the bottom left I2C socket
-
Connect the Grove LED socket kit to socket D16 on the Grove base hat, and insert an LED with the longer leg inserted into the positive hole
You will need to install Raspbian Lite on a micro-SD card. You can find the official instructions on how to configure this card in the Raspberry Pi Installation guide. You will need the latest version of Raspbian Lite.
Once the SD card has Raspbian Lite installed on it, you will need to modify a couple of files to allow you connect the Pi to WiFi, and to access the device over SSH to program it.
-
Locate the SD card in File Explorer (Windows) or Finder (macOS). It will be in a volume called
boot
. -
Create a file in the root of
boot
calledssh
. This file can be empty, it just needs to exist to allow you to ssh into the device -
Create another new file in the root of the SD card called
wpa_supplicant.conf
. This file contains the WiFi connection details. Add the following to this file:ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US network={ ssid="YOURSSID" psk="YOURPASSWORD" scan_ssid=1 }
Replace
YOURSSID
andYOURPASSWORD
with the SSID and password of your WiFi.
-
Insert the SD Card into the Pi
-
Connect it to power, somewhere near your plant, and power it on
-
Insert the Grove capacitive moisture sensor into the plants soil
-
Fix the temperature/pressure/humidity sensor somewhere where it will give a consistent reading
-
Test the connection by SSHing into your Pi. From your computer connect to
[email protected]
.If the host cannot be found then if you know the IP address (for example by using your routers management software) then you can log in to
[email protected]
, replacing192.168.0.1
with the IP address of your Pi. You can also use the Adafruit Pi Finder utility to locate it's IP address.The default password is
raspberry
. -
Change the password from the default using the following command:
passwd
Enter the current password, then a new password, then confirm the new password.
For the grove sensor to work, the I2C interface needs to be enabled.
-
Launch the configuration tool on the Pi using the following command
sudo raspi-config
-
Select option 5 Interfacing Options
-
Select option P5 I2C
-
Select Yes
-
Select OK
-
Select Finish
-
Reboot the Pi with the following command
sudo reboot
The SSH connection will be terminated, so you will need to reconnect.
Once the Pi reboots the I2C interface will be enabled.
In this step you assembled the hardware, and set up the Pi. In the next step, you will create the app in Azure IoT Central.