Read Temperature & Humidity
Call the library to get real climate numbers.
Time to Read
Your sensor is wired and the library is ready. Now you will ask it for real numbers and print them to the Serial Monitor. 🌡️
Read Temperature
Call readTemperature() to get the current value in Celsius. Store it in a float because the reading often has decimals.
float t = dht.readTemperature();All lessons in this course
- Wire the DHT11/DHT22
- Install the DHT Library
- Read Temperature & Humidity
- Handle Failed Reads