Welcome,
I have a problem with I2C communication on the ESP32 DevKit V1 board. Well, I wanted to connect several sensors supporting this standard to one I2C bus. Namely: DHT12 with library <DHT12.h>, BMP280 with library <BMP280_DEV.h> and RTC module with library <RTClib.h>. (I don't physically have the RTC module and the BMP280 yet, but I've already written code to support them). The problem is that the function :
.
causes the DHT12 sensor to malfunction - it shows NaN (Not a Number) values. When this function is removed, the data shown is correct. However, obviously this function is necessary during operation. I have included a code snippet below:
.
Could someone explain to me how to make this connection correctly?
PS. I would prefer not to change the libraries used to other libraries as this would involve changing quite a lot of the program. I can edit the libraries if that helps and someone could tell me what to change.
Thank you in advance for your help!
I have a problem with I2C communication on the ESP32 DevKit V1 board. Well, I wanted to connect several sensors supporting this standard to one I2C bus. Namely: DHT12 with library <DHT12.h>, BMP280 with library <BMP280_DEV.h> and RTC module with library <RTClib.h>. (I don't physically have the RTC module and the BMP280 yet, but I've already written code to support them). The problem is that the function :
Code: C / C++
causes the DHT12 sensor to malfunction - it shows NaN (Not a Number) values. When this function is removed, the data shown is correct. However, obviously this function is necessary during operation. I have included a code snippet below:
Code: C / C++
Could someone explain to me how to make this connection correctly?
PS. I would prefer not to change the libraries used to other libraries as this would involve changing quite a lot of the program. I can edit the libraries if that helps and someone could tell me what to change.
Thank you in advance for your help!