Created
February 18, 2016 14:05
-
-
Save kloneets/d5b01312eedfa4d10c31 to your computer and use it in GitHub Desktop.
Get remperature from DGT11
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 | |
while True: | |
try: | |
humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, 4) | |
print "Temperature: " + str(temperature) | |
except (KeyboardInterrupt, SystemExit): | |
print "\nInterrupted by user" | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment