Question
Interfacing DHT22 with STM32F429i
- June 22, 2025
- 3 replies
- 576 views
I'm trying to interface DHT22 with STM32F429i but the problem is that the sensor never responds with the high signal for 80 micro seconds after the initialization. Here you can find my code, so please tell me what could be wrong, I have been debugging this for the past week with no progress.
if ((HAL_GPIO_ReadPin (DHT22_PORT, DHT22_PIN))) Response = 1; // if the pin is high, response is ok
this if statement in line 126 never goes true. therefore the response is -1.
