Removed PIN variables.

This commit is contained in:
K
2024-10-07 01:52:09 +05:30
parent dfe54c8b9a
commit 602f274a9a
+2 -6
View File
@@ -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 import time
from board import PIN # By default I'm using GPIO PIN 16 import board
import adafruit_dht import adafruit_dht
# Initial the dht device, with data pin connected to: # 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. # 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, # This may be necessary on a Linux single board computer like the Raspberry Pi,