Temperature and Humidity Sensor
Introduction
This is a powerful sister version of our Linker kit - Temperature and Humidity Sensor. It has more complete and accurate performance. The detecting range of this sensor is 5% RH - 99% RH, and -40°C - 80°C. And its accuracy satisfyingly reaches up to 2% RH and 0.5°C. A professional choice for applications that have relatively strict requirements.
Specification
Platforms Supported
- Arduino
- Raspberry Pi
Test
Test tools and test
(1)Test tools
- Arduino UNO x 1
- Linker Base Shield x 1
- Linker temperature & humidity sensor x1
(2)、Program
#include <DHT22.h> // Only used for sprintf #include <stdio.h> // Data wire is plugged into port 7 on the Arduino // Connect a 4.7K resistor between VCC and the data pin (strong pullup) #define DHT22_PIN 7 // Setup a DHT22 instance DHT22 myDHT22(DHT22_PIN); void setup(void) {
// start serial port Serial.begin(9600); Serial.println("DHT22 Library Demo");
} void loop(void) { DHT22_ERROR_t errorCode; // The sensor can only be read from every 1-2s, and requires a minimum
// 2s warm-up after power-on. delay(2000);
Serial.print("Requesting data..."); errorCode = myDHT22.readData(); switch(errorCode) { (3)Test Results