Xinyuan-LilyGO / LilyGo-HiGrow

https://pt.aliexpress.com/item/32815782900.html
116 stars 51 forks source link

DHT11 shows no values #58

Open MiloKars opened 2 years ago

MiloKars commented 2 years ago

The DHT11 sensor does not give any values. In this project the DHT12 library is used, but that should not be a problem because it should be downwards compatible, right? What could be the problem?

mike-anderson commented 2 years ago

the DHT11 is not compatible with the DHT12 - DHT12 uses a i2c interface where DHT11 uses one wire I think... I found from other higrow libraries that the adafruit DHT library works fine with very little modification

lib_deps = 
    BH1750
        adafruit/DHT sensor library @ 1.4.0
    https://github.com/PaulStoffregen/OneWire.git
    OneButton
DanielBustillos commented 2 years ago

You need to set pin 4 before any reading.