WeMos D1 Mini DHT Temp/Hum Shield (HCWEMO0003)

Wemos ESP8266 based development boards and shields *** NEW***
Post Reply
Site Admin
Posts: 753
Joined: Sun Aug 05, 2012 4:02 pm

WeMos D1 Mini DHT Temp/Hum Shield (HCWEMO0003)

Post by admin » Wed Nov 23, 2016 10:51 am


The DHT Shield is a digital temperature and humidity sensor utilising the DHT11 sensor. Temperature range is 0~60C (+/-2C) and the humidity range is 20-90%RH (+/-5%RH).

WeMos note: The temperature and humidity data read from the sensor is the result of the last measurement (the sensor will make a new measurement after data is read from the sensor). To get real-time data, you need to read twice. It is not recommended to repeatedly read from the sensor, reading interval should be more than 2 seconds to ensure accurate measurements.


D4 on the D1 mini should be connected to Data Out pin on the DHT module.



Temperature: 0~60°C (±2°C)
Humidity: 20-90%RH (±5%RH)

Example Arduino Sketch:

Code: Select all

/* WeMos relay example - HobbyComponents.com 
   WeMos compatible DHT library can be downloaded from our support forum here:
   http://forum.hobbycomponents.com/viewtopic.php?f=111&t=2130 */

#include <dht.h>

dht DHT;

/* Define the DIO pin that will be used to communicate with the sensor */
#define DHT11_DIO D4

void setup()
  /* Setup the serial port for displaying the output of the sensor */

/* Main program loop */
void loop()
  /* Perform a read of the sensor and check if data was read OK */
  if (DHT.read11(DHT11_DIO) == DHTLIB_OK)
    /* If so then output the current temperature and humidity to 
    the serial port */
    Serial.print("Temperature: ");
    Serial.print((float)DHT.temperature, 2);
    Serial.print("Humidity: ");
    Serial.print((float)DHT.humidity, 2);
    /* If there was a problem reading from then sensor then output 
    an error */

  /* Wait at least 2 seconds before reading a new temperature */


DHT Arduino library modified for WeMos / ESP8266. Original library available from http://playground.arduino.cc//Main/DHTLib

Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

Post Reply