I have installed Ubuntu on a SD card and all necessary in order to be able to compile the code directly on the duo board.
I have compiled the provided DHT22 duo-example code and let it run. The only output I have is:
“Data not good, skip”
I have tested the sensor with Arduino nano board and it’s working fine.
I do not know what else to do…
Are voltages and pull-ups on the bus right?
I’m powering the sensor with 3.3V and I have a pull-up resistor of 10K. I have checked with 1K, with 4.7K, but the same result. I have also used a bi-directional logic level converter 5V to 3.3V in order to power the sensor with 5V but to deliver 3.3V to the duo GPIO board, with the same result…
The problem was that I wasn’t grounded the board with the sensor power supply ground…
Glad you have it sorted. A Common Ground between the Duo, and breadboard/sensor is critical for all operations. I have a data-logger that uses the DHT22 to log temp/humidity every 60 seconds to a csv logfile with timestamp in
/mnt/log/dht22.log I found using
pselect() provides a perfect blocking wait between writes.
The Duo doesn’t implement
epoll() in busybox, but since you have Ubuntu, that may also be an option. Good luck with your coding!