DHT22 Sensor driver
Primini
Hi everyone! We are working on a PoC using SDK Nordic nRF52 + Aosong AM2302 sensor + Zephyr. The AM2302 sensor works like DHT22 that is already implemented in Zephyr, but due to some reason, our implementation is not working properly. Basically, we follow the sample available in hts221 folder, but using DHT22 driver. The function sensor_sample_fetch is returning an error. We saw in dht.c that the condition (dht_measure_signal_duration(drv_data, 1) == -1) is being the cause of the read error. Our prj.conf file is configured as: CONFIG_GPIO=y CONFIG_SENSOR=y CONFIG_DHT=y CONFIG_DHT_CHIP_DHT22=y CONFIG_DHT_GPIO_PIN_NUM=3 Have you already use DHT driver in Zephyr? BR, Tiago Primini |
|
Primini
Hi everyone! The sensor sounds like work if this condition at dht.c line 42: if (elapsed_cycles >= max_wait_cycles) if (elapsed_cycles > max_wait_cycles) Could be an error in the Zephyr's DHT driver? Att, T. Primini On Tue, Feb 6, 2018 at 8:32 AM, Tiago Primini <primini@...> wrote:
|
|
Nashif, Anas
Can you please submit a bug or a PR with this change and more details. Thanks.
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...]
On Behalf Of Tiago Primini
Sent: Wednesday, February 7, 2018 10:45 AM To: zephyr-devel@... Subject: Re: [Zephyr-devel] DHT22 Sensor driver
Hi everyone!
The sensor sounds like work if this condition at dht.c line 42:
if (elapsed_cycles >= max_wait_cycles)
changes to:
if (elapsed_cycles > max_wait_cycles)
Could be an error in the Zephyr's DHT driver?
Att, T. Primini
On Tue, Feb 6, 2018 at 8:32 AM, Tiago Primini <primini@...> wrote:
|
|
Primini
Yes, I can do it. Tks! On Wed, Feb 7, 2018 at 4:04 PM, Nashif, Anas <anas.nashif@...> wrote:
|
|