diff --git a/dht11/dht11.py b/dht11/dht11.py index b2d17eb..6abd762 100644 --- a/dht11/dht11.py +++ b/dht11/dht11.py @@ -1,7 +1,10 @@ import dht import machine -d = dht.DHT11(machine.Pin(16)) +d = dht.DHT11(machine.Pin(12)) -d.measure() -print(d.temperature()) -print(d.humidity()) \ No newline at end of file +try: + d.measure() + print(d.temperature()) + print(d.humidity()) +except Exception as e: + print(e) \ No newline at end of file