ESP Wroom 32 with 2 DHT22 sensors not working
Posted: Fri May 10, 2024 3:05 pm
Hi together!
I kindly ask for support to bring a project with 2 DHT22 sensors to life. I set-up a ESP32 wroom dev board with 2 DHTs, attached to GPIO 27 & 18 GND and 3.3V without adding an additional resistor. I use ESPHome to set it up.
One of the sensors is working fine as expected, the other one sends data only after the first update-interval after a reboot/ after plugging-in the energy, at the second update-interval, the sensor sends only NaN.
See attached the code, which is use in ESPHome, but i think important to mention is, that i set the internal pullup to true for both sensors.
Assistance would highly be appreciated.
Many thanks!
I kindly ask for support to bring a project with 2 DHT22 sensors to life. I set-up a ESP32 wroom dev board with 2 DHTs, attached to GPIO 27 & 18 GND and 3.3V without adding an additional resistor. I use ESPHome to set it up.
One of the sensors is working fine as expected, the other one sends data only after the first update-interval after a reboot/ after plugging-in the energy, at the second update-interval, the sensor sends only NaN.
See attached the code, which is use in ESPHome, but i think important to mention is, that i set the internal pullup to true for both sensors.
Code: Select all
sensor:
- platform: dht
pin:
number: 27
mode:
input: true
pullup: true
temperature:
name: "Keller_Temperatur_aussen"
id: tempaussen
humidity:
name: "Keller_Luftfeuchte_aussen"
id: luftaussen
update_interval: 30s
model: DHT22
- platform: dht
pin:
number: 18
mode:
input: true
pullup: true
temperature:
name: "Keller_Temperatur_innen"
id: tempinnen
humidity:
name: "Keller_Luftfeuchte_innen"
id: luftinnen
update_interval: 10s
model: DHT22
Many thanks!