DHT22 Temperature and Humidity Sensor on the RevPi
Posted: 19 Jun 2024, 12:20
Hello,
I am learning how to use the Revolution Pi hardware.
I currently have a RevPi Core SE, connected to a DIO and an AIO modules.
I am trying to find out how to connect it and have it communicate to a DHT22 temperature and humidity sensor:
https://www.adafruit.com/product/385
So far, the closest thing I've found are these tutorials:
https://youtu.be/EcyuKni3ZTo?si=Ebsv8uExWlU7QQxG
https://learn.adafruit.com/dht/dht-circuitpython-code
An example code in python is provided at:
https://github.com/adafruit/Adafruit_Ci ... pletest.py
It instantiates a class adafruit_dht.DHT22, which requires one of the Raspberry Pi's GPIO pins to be provided, using the "board" library.
Excerpt from the example code:
So, at this stage, I'm wondering if it is possible to use the DHT22 at all with the Rev Pi. Can one of the pins in the DIO module be accessed or instantiated in such a way that is compatible with the python libraries (specifically, the board library)?
The DHT22 operates on a supply voltage of 3.3 to 5 V. Can the DIO module read digital signals below the minimum rated voltage of 12 V?
Any clarifications or insights on how to use this kind of sensor would be appreciated.
I am learning how to use the Revolution Pi hardware.
I currently have a RevPi Core SE, connected to a DIO and an AIO modules.
I am trying to find out how to connect it and have it communicate to a DHT22 temperature and humidity sensor:
https://www.adafruit.com/product/385
So far, the closest thing I've found are these tutorials:
https://youtu.be/EcyuKni3ZTo?si=Ebsv8uExWlU7QQxG
https://learn.adafruit.com/dht/dht-circuitpython-code
An example code in python is provided at:
https://github.com/adafruit/Adafruit_Ci ... pletest.py
It instantiates a class adafruit_dht.DHT22, which requires one of the Raspberry Pi's GPIO pins to be provided, using the "board" library.
Excerpt from the example code:
Code: Select all
import time
import board
import adafruit_dht
# Initial the dht device, with data pin connected to:
dhtDevice = adafruit_dht.DHT22(board.D18)
# you can pass DHT22 use_pulseio=False if you wouldn't like to use pulseio.
# This may be necessary on a Linux single board computer like the Raspberry Pi,
# but it will not work in CircuitPython.
# dhtDevice = adafruit_dht.DHT22(board.D18, use_pulseio=False)
The DHT22 operates on a supply voltage of 3.3 to 5 V. Can the DIO module read digital signals below the minimum rated voltage of 12 V?
Any clarifications or insights on how to use this kind of sensor would be appreciated.