into the overall interrupt handler: https://github.com/mianos/micropython/b ... esp_gpio.c
Then I can dump out the exact timing of the pulses when the read finishes. In my experiments (still in in the code),
I didn't get anywhere near the variation in the timing you did. Mine was so tight I can see the extra 5mS given by the chip in between each byte in the bit stream. AT 80Mhz I see less then 5 checksum errors in 100,000 reads with this timing:
if (elapsed > 45 && elapsed <= 55) {
self->state = DHT_STATE_DATA_DATA;
} else if (elapsed > 55 && elapsed < 80) {
self->state = DHT_STATE_DATA_DATA;
} else {
self->state = DHT_ERROR;
return -1;
}