Error of Python lesson “using the DHT11 sensor”.

There is an error in the code of the lesson “using the DHT11 sensor”, as picture shown:



You need to change it like these:

Instance = dht11.DHT11(pin=4)

GPIO.setwarnings(True)

GPIO.setmode(GPIO.BCM)

Tagged:
Sign In or Register to comment.