Overview
Is it too cold, hot, humid, or dry in your home? Do you have a hunch but not sure? Any of these extremes could have an effect on your health.
Knowing the humidity inside your home is helpful. Too humid, and mold can grow as well as release allergens in the air that can cause health problems. Too dry, and other issues like throat, nose, and eye irritation may result.
Regardless of health, sometimes times it's just fun to know the humidity and temp values of your environment!
With the AHT20 Temperature and Humidity sensor, an ESP32-S2 Feather and Adafruit IO WipperSnapper, you can easily track the temperature and humidity of your home or other locations. The best part - there’s no coding or soldering required!
In this guide, you’ll connect an AHT20 Temperature and Humidity sensor to an ESP32-S2 Feather. Then, load the AdafruitIO WipperSnapper firmware onto the ESP32-S2 Feather to connect your device to Adafruit IO. You'll configure the AHT20 sensor from the WipperSnapper website to send data to Adafruit IO.
Finally, you’ll create a handy dashboard to view the temperature and humidity data.
Prerequisite Guide:
WipperSnapper is an interface for Adafruit IO, Adafruit's incredibly easy-to-use IoT platform, designed to turn any WiFi-capable board into an IoT device without programming a single line of code.
If you've never used WipperSnapper, click below to read through the Quickstart WipperSnapper guide before continuing.
Page last edited March 08, 2024
Text editor powered by tinymce.
Feather and AHT20 Set Up
Connect the AHT20 Sensor
Connect the AHT20 sensor to the Feather. With the Stemma QT cable, plug one end to the I2C port on the Feather (in the middle of the board) and the other to either end to the AHT20 sensor.
Set Up the Feather
The next step is to get your Feather set up in the Adafruit IO WipperSnapper page. Follow the instructions in the Quickstart guide to do this.
On the Configure AHT20 modal,
- After you clicked "New Component", WipperSnapper scanned the ESP32-S2 Feather's I2C bus. The AHT20 sensor's unique address was found at 0x38 (For more information about I2C addressing, check out this guide.)
- Under the "Send Every" option, select how often you'd like the sensor to be polled for new data, and send it to Adafruit IO.
- Click "Create Component".
Once the component is created, you should see values populate for the temperature and humidity after the "Send Every" interval has elapsed. You can see the above values change dramatically when I breathe on the sensor.
The temperature is output in degrees Celsius and the humidity is output as relative humidity.
Page last edited March 08, 2024
Text editor powered by tinymce.
Configure Dashboard
Now that you have verified that the sensor is working, it's time to create an Adafruit IO Dashboard. Dashboards allow you to visualize data and control Adafruit IO-connected projects from any modern web browser.
- For more information about Adafruit IO Dashboards, visit our Learn Guide on this topic.
- On the WipperSnapper device page, click "Add to Dashboard" on either the humidity or temperature sensor. Then click "+ New Dashboard"
Add a Line Chart Block
The line graph allows you to visualize numeric data over time. You can set the time range in hours that the chart will load, and set the labels for each axis of the chart. The chart will update dynamically whenever new values are pushed to the feed.
The line chart is great to see the temp and humidity values in the past but for seeing the current values, a couple of "gauge" blocks in the dashboard will be quite helpful.
- Name the block and set a min of 0 and a max of 100 (or other values that you may fancy). Next, label the gauge "C°" for Celsius. (how to bleow)
How to label the gauge "C°"
- To type the degree sign: " ° " follow the below instructions.
- Mac: option+shift+8
- PC: Hold down the Alt key, and on the numeric keypad on the right of the keyboard, type 0176 or Alt+ 248
- Linux is a little more involved.
- Click the "gear" icon and then click "Edit Layout". Now you can drag and scale the blocks to your choosing.
Next Steps
That's it! You've got a handy dashboard for your temperature and humidity data.
If you'd like to make the Dashboard "public" to share it with others, follow this guide here.
Lastly, you may want to think about mounting the Feather and AHT20 somewhere that makes sense for you. Follow this guide for some different 3D printed case ideas for your Feather and sensor.
Happy sensing!
Page last edited March 08, 2024
Text editor powered by tinymce.