Arduino Sensor Kit now with DHT20

Got today my second Arduino Sensor Kit (link Arduino product page)Arduino Sensor Kit.
But surprise the DHT11 module was replaced by a DHT20 i2C module.
How is this possible???

How is it possible? When parts are upgraded kits eventually go to the new part. The DHT 20 is nice because it uses a I2C data transfer protocol. Looking around you will find code samples like this one. You will find the DHT 20 library here. The DHT 20 offers some nice improvements over the DHT 11 and DHT 22 family.


1 Like

Created following Example:

#include "Arduino_SensorKit.h"
#define DHTTYPE DHT20   // DHT 20
/*Notice: The DHT10 and DHT20 is different from other DHT* sensor ,it uses i2c interface rather than one wire*/
/*So it doesn't require a pin.*/
DHT dht(DHTTYPE);         //   DHT10 DHT20 don't need to define Pin

void setup() {
    Serial.println("DHTxx test!");
void loop() {
    float temp_hum_val[2] = {0};
    // Reading temperature or humidity takes about 250 milliseconds!
    // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)

    if (!dht.readTempAndHumidity(temp_hum_val)) {
        Serial.print("Humidity: ");
        Serial.print(" %\t");
        Serial.print("Temperature: ");
        Serial.println(" *C");
    } else {
        Serial.println("Failed to get temprature and humidity value.");