Skip to content

Instantly share code, notes, and snippets.

@backmeupplz
Created March 29, 2019 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save backmeupplz/15ca13d392b69282049b6b196fd56096 to your computer and use it in GitHub Desktop.
Save backmeupplz/15ca13d392b69282049b6b196fd56096 to your computer and use it in GitHub Desktop.
import sys
import Adafruit_DHT
while True:
humidity, temperature = Adafruit_DHT.read_retry(11, 4)
print 'Temp: {0:0.1f} C Humidity: {1:0.1f} %'.format(
temperature, humidity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment