DHT does not work

  • hallo
    i have a trouble with DHT library
    it does not work
    and i get this value
    280.5 280.5
    i hope can help me

  • Hi

    I'm having the same issue with DHT11 I ordered dht22 I'll check if it is related to the why DHT11 is being read
    Since normal the function stop all concurrence and threads this might be related to this

  • from machine import Pin
    from DHT import DHT11

    dht_pin=Pin('G4', Pin.OPEN_DRAIN)

    temp, hum = DHT11(dht_pin)
    while True:
    temp_str = '{}.{}'.format(temp//10,temp%10)
    hum_str = '{}.{}'.format(hum//10,hum%10)

    print(temp_str, hum_str)

    this is the code is running

  • This post is deleted!

Log in to reply

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.