This guide is also compatible with the Raspberry Pi using CircuitPython. We're going to build the house's lighting system, wire up the temperature and humidity monitoring circuit, and program it with CircuitPython.
The Pi Zero W has built-in WiFi - which is great for connecting our environmental monitor to Adafruit IO. It's also smaller than a regular Raspberry Pi 3, making it the perfect size to bring with you (monitor the air in the subway station) or stick it in a small corner of your room.
While we could use a breadboard, we'll build our own pHAT for our IO House.
First, solder the included 20x2 GPIO Header to the Perma Proto Bonnet
Follow the steps on the Putting it Together page until you reach the Arduino Wiring. Instead of following that, use the Python Wiring below:
Make the following connections between the Si7021 sensor to the Pi:
- Si7021 Vin to Pi 3V
- Si7021 GND to Pi Ground
- Si7021 SCL to Pi SCL
- Si7021 SDA to Pi SDA
Make the following connections between the NeoPixel Jewel to the Pi:
- NeoPixel Jewel GND to Pi GND
- NeoPixel Jewel PWR to Pi 3V
- NeoPixel Jewel DIN to Pi Digital Pin #18
Make the following connections between the 3-Pin JST Plug to the NeoPixel Jewel:
- NeoPixel Jewel GND to JST Left Pin
- NeoPixel Jewel DOUT to JST Middle Pin
- NeoPixel Jewel PWR to JST Right Pin
Lastly, we'll connect the NeoPixel stick to the 3-Pin JST receptacle:
- NeoPixel Stick GND to JST Left Pin
- NeoPixel Stick DI to JST Middle Pin
- NeoPixel Stick +5V to JST Right Pin
After wiring it up, plug the 3-Pin JST from your bonnet into the receptacle from the roof. Plug the Pi's PWR IN into a 5V 2.5A switching power supply.
Next, we're going to set up the Raspberry Pi Zero for use with CircuitPython, Adafruit IO, NeoPixels, and the Si7021.