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.


Angled shot of rectangular microcontroller.
What's Feather-shaped and has an ESP32-S2 WiFi module? What has a STEMMA QT connector for I2C devices? What has your favorite Espressif WiFi microcontroller and lots of Flash and...
In Stock
Adafruit AHT20 - Temperature & Humidity Sensor Breakout Board
The AHT20 is a nice but inexpensive temperature and humidity sensor from the same folks that brought us the DHT22. You can take...
In Stock
Angled shot of STEMMA QT / Qwiic JST SH 4-pin Cable.
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of...
Out of Stock
5V 2A Switching Power Supply with  USB-A Connector
Our 5V 2A USB power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!This adapter was...
Out of Stock
USB Type A to Type C Cable - approx 1 meter / 3 ft long
As technology changes and adapts, so does Adafruit. This  USB Type A to Type C cable will help you with the transition to USB C, even if you're still...
In Stock

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. 

Please make sure you are running WipperSnapper Beta firmware version 16 or newer. I2C sensors will not work in previous versions of the WipperSnapper beta firmware.
  • From the WipperSnapper Device Interface, click "New Component".
  • Select "AHT20".

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.

Troubleshooting I2C Sensors in WipperSnapper

  • Make sure the AHT20 is connected to the Feather before trying to add the component or you may see this error.
  • In order to find the correct I2C address, the sensor must be connected to the board at the time of adding the component.

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. 

Create a new Dashboard

  • On the WipperSnapper device page, click "Add to Dashboard" on either the humidity or temperature sensor. Then click "+ New Dashboard"
  • Next, create a name and description for the dashboard and click "create".

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.

  • Click the "gear" icon. Then click "Create New Block".
  • Select the "Line Chart".
  • Select both the humidity and temperature sensor feeds.
  • Name and label the chart. The Y-axis min can be 0 and the max can be 100.
  • Nice chart! Both the temperature and humidity get their own lines. 
  • You can place your mouse over the lines to see exact values at exact times.

Add Gauge Blocks

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.

  • Create a new block and select the "Gauge" block.
  • Select the Temperature sensor feed.
  • 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°"

  • Next, create another new gauge block for humidity. Select the Humidity Sensor feed.
  • Name and label the block. Set a min of 0 and 100 for max.

Formatting your Dashboard

  • Now that all of the blocks are on the dashboard, organize the blocks so they are more readable.
  • Click the "gear" icon and then click "Edit Layout". Now you can drag and scale the blocks to your choosing.

Now that's a good-looking Dashboard!

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!

This guide was first published on Dec 10, 2021. It was last updated on Dec 10, 2021.