Hi,
During debugging the DHT22 Lib I found out that the function delay(1) does not delay 1msec. To reproduce the error I wrote this short code for test.
void setup() {
pinMode(A7, OUTPUT);
}
void loop() {
digitalWrite(A7, LOW);
delay(1);
digitalWrite(A7, HIGH);
delay(100);
}
The result ist this (video 2MB)
Oscilloscope, Timebase 200.0us
In words:delay(1) produces delays that are shorter than 1ms and the measured delay times jumps between 1ms to nearly zero.The delay gets shorter and shorter then jumps to a longer delay and get shorter again