Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support DHT22 Sensor #12

Open
khajievN opened this issue Dec 31, 2016 · 4 comments
Open

Please add support DHT22 Sensor #12

khajievN opened this issue Dec 31, 2016 · 4 comments

Comments

@khajievN
Copy link

Please add DHT22 temperature sensor in this driver.

@SergiyKorotun
Copy link

+1

2 similar comments
@gmarat13
Copy link

+1

@emmynet
Copy link

emmynet commented Jun 16, 2017

+1

@emmynet
Copy link

emmynet commented Jun 16, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants