well, I jumped too soon. It still is not working. So I loaded the test script from the dht22.h library. Here’s that code (with a mod I made to do a string dump of the data from the sensor)
#include <DHT22.h>
//define pin data
#define pinDATA 0 // SDA, or almost any other I/O pin
DHT22 dht22(pinDATA);
void setup() {
Serial.begin(115200); //1bit=10µs
Serial.println("\ntest capteur DTH22");
}
void loop() {
Serial.println(dht22.debug()); //optionnal
float t = dht22.getTemperature();
float h = dht22.getHumidity();
Serial.println("StringData");
Serial.println(dht22.getRawStrData());
if (dht22.getLastError() != dht22.OK) {
Serial.print("last error :");
Serial.println(dht22.getLastError());
}
Serial.print("h=");Serial.print(h);Serial.print("\t");
Serial.print("t=");Serial.println(t);
delay(2000); //Collecting period should be : >1.7 second
}
And here is a printout of the serial output.
### BEGIN DEDUG ###
look at datasheet for timing specs
t_80L t_80H t_50 t_Bit0 t_Bit1
80 80 50 0 0
error : 1
0000000000000000 0000000000000000 00000000
h t crc
0.0 0.0 TRUE
### END DEDUG ###
StringData
0000000000000000 0000000000000000 00000000
Very confusing to me. I have no way of debugging the sensor that I can find, I have tried two different Seeed XIAO ESP32c3 processors and two different sensors and get the same results. I have changed pins twice with no change and I have changed voltages with on change. I don’t know what else I can do to get this sensor working with the seeed.