Using DHT22(AM2302) sensor
Hi,
I'm looking for some example how to use the sensor with STM32 and wonder why all of them, which I've found, are based on the loop not on interrupts.
The response is 40 bits and it takes up to several milliseconds to read it, so during the time MCU is either hanging (if interrupts are disabled) or can miss some bits (if some other interrupt is handled for >24us or, if using RTOS, some other task is started e.g.).
Could you please help me and suggest a good example of using the sensor or advice if I'm wrong and it's senseless for use interrupts for it (I mean to catch failing and rising edges from the sensor and fill an array by "their times").
Thanks in advance!
