voeg gpio setup toe
This commit is contained in:
4
dht11.py
4
dht11.py
@@ -7,6 +7,10 @@ sensor = adafruit_dht.DHT11(board.D6)
|
|||||||
LED_PIN = 21
|
LED_PIN = 21
|
||||||
FAN_PIN = 22
|
FAN_PIN = 22
|
||||||
|
|
||||||
|
GPIO.setmode(GPIO.BCM)
|
||||||
|
GPIO.setup(LED_PIN, GPIO.OUT)
|
||||||
|
GPIO.setup(FAN_PIN, GPIO.OUT)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
temperatuur_C = sensor.temperature
|
temperatuur_C = sensor.temperature
|
||||||
|
|||||||
Reference in New Issue
Block a user