If not, consult my article about customizing different operating system images for Raspberry Pi. (Copyright © 2021 Matt Hawkins) Install the DHT sensor softwareīefore proceeding, make sure you have an operating system installed on the Raspberry Pi Zero W and can connect to it remotely or with a keyboard. This diagram from Raspberry Pi Spy shows the pin layout for the Raspberry Pi Zero W (among others). DHT22 Ground pin Raspberry Pi Group pin (#6).DHT22 Data pin Raspberry Pi GPIO4 pin (#7).DHT22 Positive pin Raspberry Pi GPIO v5 pin (#2).Finally, I connected the Ground pin on the DHT22 to a ground pin on the Raspberry Pi header. I am using GPIO4 for this, but any would work just make a note of the one you choose, as the Python code that reads the data from the sensor will need to know which pin to read from. I connected the Data pin on the DHT22 to one of the Raspberry Pi GPIO pins. The DHT22 runs on 3v-6v, so I selected one of the 5v pins on the Raspberry Pi to provide the power. The Positive pin provides power from the Pi to the DHT22. I used Raspberry Pi Spy's Raspberry Pi GPIO guide to make sure I connected everything correctly. You can wire the DHT22 directly to the Raspberry Pi Zero W. The DHT22 with the PCB attached has three pins: a Positive pin (marked with +), a Data pin, and a Ground pin (marked with -). If you purchase a raw sensor, you'll need a resistor and some soldering skills to get it working (check out Pi My Life Up's DHT22 article for great instructions on working with the raw sensor), but you can also purchase one with a small PCB that includes all that, which is what I did. The DHT22 is a digital sensor, making it easy to interact with. You can find a bunch of inexpensive DHT22 temperature and humidity sensors with a quick web search. Whitepaper: Data-intensive intelligent applications in a hybrid cloud blueprint.eBook: Running Kubernetes on your Raspberry Pi.Getting started with Raspberry Pi cheat sheet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |