Submitted by: Submitted by eyecan
Views: 10
Words: 2281
Pages: 10
Category: Science and Technology
Date Submitted: 07/10/2015 07:46 AM
DHT Humidity Sensing on Raspberry Pi or Beaglebone Black with
GDocs Logging
Created by lady ada
Last updated on 2015-04-26 02:30:10 PM EDT
Guide Contents
Guide Contents
Overview
Wiring
Wiring up DHT humidity sensors
Raspberry Pi
Beaglebone Black
Software Install (Updated)
(http://adafru.it/dCK)Downloading the Code from Github
Installing the Library
Testing the Library
C Language Code
Connecting to Googles Docs (Updated)
Create and prepare spreadsheet
Get OAuth2 credentials
Run Python Code
© Adafruit Industries
https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-withgdocs-logging
2
3
5
5
5
7
10
10
10
10
11
13
13
14
15
Page 2 of 17
Overview
This tutorial is a first attempt to develop a DHT interface driver. It is not guaranteed to work,
and is for experimentation and hacking!
Time to start exploring more sensors with the Raspberry Pi and Beaglebone Black! Today we'll be
checking out the DHT11 (http://adafru.it/386), DHT22 (http://adafru.it/385) and
AM2302 (http://adafru.it/393) humidity and temperature sensors available from Adafruit
In this tutorial we'll be showing how to install a DHT sensor Python library which utilizes C for highspeed GPIO polling to handle bit-banged sensor output. Many low cost sensors have unusual
output formats, and in this case, a "Manchester-esque" output that is not SPI, I2C or 1-Wire
compatible must be polled continuously by the Pi to decode. Luckily, the C GPIO libraries are fast
enough to decode the output.
Once we have that working, we add the fun of Python to update a google spreadsheet live with the
temperature/humidity data. This project would be the great basis for home or garden automation!
You can check out our spreadsheet here, it wont be updated live after Aug 24 2012 but it will show
© Adafruit Industries
https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-withgdocs-logging
Page 3 of 17
you the format of data you get...