diff --git a/temp-calc.py b/temp-calc.py index cfa3a4d..b166231 100755 --- a/temp-calc.py +++ b/temp-calc.py @@ -1,13 +1,9 @@ -# Specify the pin you'll be connecting the data/signal PIN of DHT11 to here: -PIN = 16 -DPIN = "D" + str(PIN) - import time -from board import PIN # By default I'm using GPIO PIN 16 +import board import adafruit_dht # Initial the dht device, with data pin connected to: -dhtDevice = adafruit_dht.DHT11(DPIN) +dhtDevice = adafruit_dht.DHT11(board.D16) # by default I'm using GPIO PIN 16 for data/signal transmission of DHT11 # you can pass DHT22 use_pulseio=False if you wouldn't like to use pulseio. # This may be necessary on a Linux single board computer like the Raspberry Pi,