Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Add support for DHT-22 #13

Open
Dzeri96 opened this issue Sep 27, 2022 · 0 comments
Open

Add support for DHT-22 #13

Dzeri96 opened this issue Sep 27, 2022 · 0 comments

Comments

@Dzeri96
Copy link

Dzeri96 commented Sep 27, 2022

I'm poking around the code and I'd like some guidance on how to make a PR that enables DHT-22 support.
After enabling the overlay in the boot settings, I'm able to read the raw values via IIO_READER in python like so:

from reading import IIO_READER
import iio

sensor = IIO_READER()
sensor.get_readings(iio.Context())

However, idetect is only scanning for i2c devices and the DHT-22 is not initialized. What do I have to do to fix this?

If I skip the check for the device count in sensors.py, everything seems to work fine, except the raw values from the sensor are shown. We need to convert these to actual temp/humidity units.

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

No branches or pull requests

1 participant