Ks0129 keyestudio EASY plug DHT11 Temperature and Humidity Sensor
Revision as of 10:51, 16 February 2017 by Keyestudio (talk | contribs)
EASY plug DHT11 Temperature and Humidity Sensor
Introduction
This DHT11 Temperature and Humidity Sensor features a digital temperature and humidity sensor complex with a calibrated digital signal output. It can detect temperature and humidity of the surroundings. It has excellent quality, fast response, anti-interference ability and high cost performance advantages.
Note: this module needs to be used together with EASY plug control board.
Specification
- Interface: Easy plug
- Supply Voltage: +5 V
- Temperature range: 0-50 °C error of ± 2 °C
- Humidity: 20-90% RH ± 5% RH error
- Interface: Digital
- Size: 42*20mm
- Weight: 6g
Connection Diagram
Sample Code
#include <dht11.h> dht11 DHT; #define DHT11_PIN 10 void setup(){ Serial.begin(9600); Serial.println("DHT TEST PROGRAM "); Serial.print("LIBRARY VERSION: "); Serial.println(DHT11LIB_VERSION); Serial.println(); Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)"); } void loop(){ int chk; Serial.print("DHT11, \t"); chk = DHT.read(DHT11_PIN); // READ DATA switch (chk){ case DHTLIB_OK: Serial.print("OK,\t"); break; case DHTLIB_ERROR_CHECKSUM: Serial.print("Checksum error,\t"); break; case DHTLIB_ERROR_TIMEOUT: Serial.print("Time out error,\t"); break; default: Serial.print("Unknown error,\t"); break; } // DISPLAT DATA Serial.print(DHT.humidity,1); Serial.print(",\t"); Serial.println(DHT.temperature,1); delay(1000); }
Resources
Datasheet
http://www.keyestudio.com/files/index/download/id/1464241725/