Skip to content

Instantly share code, notes, and snippets.

@kloneets
Created Feb 18, 2016
Embed
What would you like to do?
Get remperature from DGT11
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