Easily add a temperature and humidity sensor to your WeMos D1 Mini ESP8266 project with this shield from Tronixlabs Australia.
Easy to use with popular library support. Note - the temperature and humidity data read from sensor is the result of the last measurement (the sensor will measure after you read). To get real-time data, you need read twice. It is not recommended to repeatedly read the sensor, the reading interval should be more than 2 seconds. If you need a faster sensor, consider the SHT30.
A full set of WeMos stacking headers and pins are included with each shield.
Shield schematic (.pdf)
status, temp, humi, temp_dec, humi_dec = dht.read(pin)
if status == dht.OK then
-- Integer firmware using this example
-- Float firmware using this example
elseif status == dht.ERROR_CHECKSUM then
print("DHT Checksum error.")
elseif status == dht.ERROR_TIMEOUT then
print("DHT timed out.")