-
Notifications
You must be signed in to change notification settings - Fork 1
dht22
The dht22
module is designed to read the temperature and relative humidity values from a DHT22 sensor. It sends these values as telemetry.
The UI looks like this:
The UI updates with fresh telemetry each time the telemetry data is refreshed.
The pinout is as follows:
- GND -> GND
- VCC -> 3.3V
- DOUT -> GPIO 16 on the S2 Mini (D4 on D1 Mini)
I used this shield that comes pre soldered for the D1 Mini, but is pin compatible with the S2 Mini: https://nettigo.eu/products/dht22-shield-for-wemos-d1-mini
Here is an image of it:
I used a S2 Mini as the main controller: https://www.wemos.cc/en/latest/s2/s2_mini.html
At the moment there are no config options for this module. All the pins are hardcoded.
The main point of this module is to provide telemetry about what the temperature and humidity. It also provides a time indicator as to when the readings were last updated. It provides these as telemetry on each cycle. It will not provide any telemetry if it has not been able to read the sensor (yet).
telemetry = {
"temperature/dht22" : self.currentT,
"humidity/dht22" : self.currentH,
"tempReadAt": self.lastConvert
}
This module consumes no telemetry from other modules.
This module does not provide any commands to other modules. It only provides telemetry about the internal state.
This module does not consume any commands from other modules.