DHT22 temperature and humidity module and Espruino example

1,551

AM2302 capacitive humidity sensing digital temperature and humidity module is one that contains the compound has been calibrated digital signal output of the temperature and humidity sensors. Application of a
dedicated digital modules collection technology and the temperature and humidity sensing technology, to ensure that the product has high reliability and excellent long-term stability. The sensor includes a capacitive sensor wet components and a high-precision temperature measurement devices, and connected with a high-performance 8-bit microcontroller. The product has excellent quality, fast response, strong anti-jamming capability, and high cost. Each sensor is extremely accurate humidity calibration chamber calibration.

The form of procedures, the calibration coefficients stored in the microcontroller, the sensor within the processing of the heartbeat to call these calibration coefficients. Standard single-bus interface, system integration quick and easy. Small size, low power consumption, signal transmission distance up to 20 meters, making it the best choice of all kinds of applications and even the most demanding applications. Products for the 3-lead (single-bus interface) connection convenience

Features
Ultra-low power, the transmission distance, fully automated calibration, the use of capacitive humidity sensor, completely interchangeable, standard digital single-bus output, excellent long-term stability, high accuracy temperature measurement devices.

Schematics and connections

Module Pin Espruino
1 (Vcc) 3.3
2 (S) C11
3 (GND) GND

espruino and dht22
espruino and dht22

 

Code

var dht = require("DHT22").connect(C11);
setInterval(function() {
 dht.read(function (a) {
 console.log("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());
 });
}, 1000);

 

Output

Temp is 25.4 and RH is 37.4
Temp is 25.3 and RH is 37.4
Temp is 25.3 and RH is 37.5
Temp is 25.3 and RH is 37.5
Temp is 25.3 and RH is 37.6
Temp is 25.2 and RH is 37.6
Temp is 25.2 and RH is 38.8
Temp is 25.2 and RH is 44.5
Temp is 25.3 and RH is 50
Temp is 25.3 and RH is 54.5
Temp is 25.4 and RH is 57.5
Temp is 25.6 and RH is 60.4
Temp is 25.7 and RH is 63.6
Temp is 25.8 and RH is 66.5
Temp is 26 and RH is 69.5
Temp is 26.2 and RH is 67.9
Temp is 26.3 and RH is 63.6

Links

http://akizukidenshi.com/download/ds/aosong/AM2302.pdf

DHT22 single-bus digital temperature and humidity sensor module

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.