Created
March 18, 2018 11:05
-
-
Save joelthchao/7cae36362b924685d4b23a12a8a0d7cb to your computer and use it in GitHub Desktop.
DHT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Adafruit_DHT | |
sensor = Adafruit_DHT.AM2302 | |
pin = 4 | |
humidity, temperature = Adafruit_DHT.read_retry( | |
sensor, pin, retries=5, delay_seconds=1) | |
print('{},{}'.format(humidity, temperature)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment