Hey!
I just got done building a forked driver for Radxa Zero which talks to DHT22 sensors via GPIO, if you’re okay with that. It’s based on the excellent Adafruit DHT sensor driver (Which I’m not allowed to link because of forum rules). It SHOULD work for other devices using libmraa, as it really only talks to the mraa C-library.
You can check out my driver on github if you want to try. I haven’t yet updated the description, but installation should be as simple as calling ‘sudo python3 setup.py install’ in the project directory. If it does not autodetect your device, add ‘–force-radxa0’ to the call.
The driver builds against libmraa (which btw can’t really read pins from the command line, I don’t know why.)
When installed, you can get sensor values with
import Rockfruit_DHT as dhtdriver
dht22_port = 8 # Your GPIO port!
humidity,temperature = dhtdriver.read_retry(dhtdriver.DHT22, dht22_port)
in python3 (with admin rights).
I wrote the driver mostly for myself, but let me know if you try!
If you want to use SPI, maybe look at https://github.com/SIGSEGV111/dht22-spi-driver or similar?