drivers: sensor: dht: Fix sensor read issue on esp32_devkitc_wrover
The DHT[11/22] sensor driver fails to read data due to an extra "gpio_pin_set_dt" that is occurs prior to waiting for the sensor active response. This leads to consistent failed reads on esp32 (devkitc, wrover). After removing this line reads are consistently successful. Signed-off-by: Omar Naffaa <omarnaffaa.on@gmail.com>
This commit is contained in:
@@ -82,8 +82,6 @@ static int dht_sample_fetch(const struct device *dev,
|
||||
|
||||
k_busy_wait(DHT_START_SIGNAL_DURATION);
|
||||
|
||||
gpio_pin_set_dt(&cfg->dio_gpio, false);
|
||||
|
||||
/* switch to DIR_IN to read sensor signals */
|
||||
gpio_pin_configure_dt(&cfg->dio_gpio, GPIO_INPUT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user