Temp and hum sensor: DHT11
Read temperature and humidity
What are we going to do?
In this activity you'll read the ambient temperature and humidity with a DHT11 sensor brick. In order to use the sensor, you'll need a library. Libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data. Don't worry, I'll show you how they work. You'll also learn how the serial monitor works.
Let's get started
Follow these instructions carefully. You can click on some of the images to zoom in.
Always connect the components BEFORE powering the UNO board or YOU MAY DAMAGE YOUR BOARD OR COMPONENTS.
Now, what else?
Now is your turn:
- Change the code to personalize the format of the temperature and humidity readings. Remember the difference between Serial.print and Serial.println
- Now, I propose a challenge, do you think you can change the code to show the temperature in Fahrenheit instead of Celsius?
Pingback: Encoder and servo – makit
Pingback: Seven segment display – makit
Pingback: Inputs and outputs: button – makit