contrib-drivers icon indicating copy to clipboard operation
contrib-drivers copied to clipboard

Please add support DHT22 Sensor

Open khajievN opened this issue 9 years ago • 4 comments

Please add DHT22 temperature sensor in this driver.

khajievN avatar Dec 31 '16 04:12 khajievN

+1

SergiyKorotun avatar Jan 18 '17 10:01 SergiyKorotun

+1

gmarat13 avatar Feb 28 '17 14:02 gmarat13

+1

emmynet avatar Jun 16 '17 13:06 emmynet

I think it is not possible to implement a driver for this sensor for the GPIO speed transmission constraints.


from: androidthings.rocks

In the Native SDK the GPIO speed is 0.15ms , which is still 150μs and nowhere near the 20-40μs required by the sensor.

Android Things and the fact it uses Linux, which is not a real-time operating system. A conversation with a member of the Android Things team suggested the following:

Your not likely to get consistent sub-1ms timing at the application layer. If the data on the wire is timed the same as a UART, you might be able to write/read using a custom baud rate (thats ~25K baud). Otherwise you’ll probably have to implement it on an MCU.


I tried to do a porting of rasbian c++ code but the Gpio::setValue(..)/Gpio::getValue() speed is high (150μs).

I think that if we use Native PIO, we have the same result.

emmynet avatar Jun 16 '17 18:06 emmynet