Book Image

Raspberry Pi Blueprints

Book Image

Raspberry Pi Blueprints

Overview of this book

Table of Contents (17 chapters)
Raspberry Pi Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up the remaining sensors


Now that we have the Maplin sensors and the LDR working properly, using the Arduino board, we can turn our focus to the remaining sensors that will measure temperature, humidity, and the barometric pressure.

For this, we will use DHT11 or DHT22 to measure the temperature and humidity and BMP180 to measure the barometric pressure. These devices can be interfaced directly to and powered from the GPIO port on the Pi.

DHT11/22

DHT11 and DHT22 use a one-wire communication protocol to send data back to the Pi, which requires an additional 10 K (brown, black, and orange) resistor to be added between the data and 3.3 V pins on the sensor. The easiest way to do this is by mounting the DHT sensor, resistor, and a row of male pin headers on a small section of a stripboard, as shown in the following diagram:

Once this is complete, the board should look similar to the following image:

The copper tracks run vertically from the top of the preceding image to the bottom. As this...