Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Adafruit_DHT as dht
- import lcddriver
- lcd = lcddriver.lcd()
- try:
- while True:
- h,t = dht.read_retry(dht.DHT22, 4)
- lcd.lcd_display_string("Homerseklet: {0:0.1f}*C".format(t, h), 1)
- lcd.lcd_display_string("Paratartalom: {1:0.1f}%".format(t, h), 2)
- time.sleep(60)
- except KeyboardInterrupt:
- lcd.lcd_clear()
Advertisement
Add Comment
Please, Sign In to add comment