Removed PIN variables.

This commit is contained in:
K 2024-10-07 01:52:09 +05:30
parent 73c967ed31
commit 0672904e41
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

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
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,