Closed countrysideboy closed 8 months ago
I use the DHT.begin(ada,scl) to test if the sensor is exisit, and swap the pin. it is not difficult to adapt the code to the new version. And the pr2040 do use the different method to change the default i2c pin.
For the esp32 you could use the example DHT20_test_esp.ino
In this example you just swap the parameters in Wire.begin(sda, scl)
For the RP2040, there are two calls to change the pins
Wire.setSDA(pin);
Wire.setSCL(pin);
Option is to add a new example DHT20_test_RP2040 .ino
Added an example - DHT20_test_rp2040.ino
Hi, I understand the PR request, however I removed the Wire parameters of begin with a number of reasons.
The new interface is not difficult to patch in your sketch. You only need to call Wire.begin() or Wire.begin(sda, scl) before the DHT20.begin()** and your sketch should work.