Overview
In this tutorial, we will show you how to connect an Arduino UNO R3 with an ESP8266 WiFi module mounted on an ESP-01 adapter. We will also explain the steps for setting up a new channel on ThingSpeak and how to write data on the channel. This tutorial is suitable for beginners who want to learn how to use an Arduino UNO R3 and ESP8266 WiFi module to send data to ThingSpeak and can potentially work as a base to connect any air quality sensor and share data online.
Materials Required:
- Arduino UNO R3
- ESP8266 WiFi module mounted on an ESP8266 ESP-01 adapter
- USB cable
- Breadboard or Prototype Expansion Module (Optional)
- Female to male Dupont wires
The ESP-01 Adapter is used for easier interfacing with the ESP8266 WiFi module, it includes an 3.3V voltage regulator and 5V to 3.3V logic level shifting.
ESP-01 can be wired directly to UNO but in case that you are also considering to connect a sensor, using a breadboard or the prototype expansion module (which can be mounted on top as a shield) allows you to have more space and connections for more sensors.
Wiring Diagram

Wiring Steps


Connect the ESP-01 with ESP8266 WiFi module to the Arduino UNO R3 board. To do this, connect the following pins:
- ESP-01 GND pin to Arduino GND pin
- ESP-01 VCC pin to Arduino 5V pin
- ESP-01 RX Receive Data pin to Arduino pin 11
- ESP-01 TX Transmit Data pin to Arduino pin 10

Setting up ThingSpeak Channel
- Create an account on ThingSpeak
- Create a new channel, on Channel Settings tab you can configure the name, description and fields used on your channel. Each channel can have up to 8 fields
- On Sharing tab, under Channel Sharing Settings select the option “Share channel view with everyone” this will make it public and anyone will be able to see your shared data.
- On API Keys tab you can get the keys to write or send data to the channel.


Writing the code
- Open Arduino IDE on your computer and start a new sketch.
- In this tutorial we’ll only need SoftwareSerial library, if we try to connect ESP-01 RX/TX pins to Uno’s Serial TX/RX it will block the connection between Uno and IDE as the USB serial works on the same pins to communicate to our computer, Software serial allows us to connect ESP-01 through pins 10 and 11.
- Write the following code into your sketch:
Now we can upload our code into Uno and test how it generates a random number and writes it into our channel, ThingSpeak allows us to share and visualize publicly our data, for our PhillyAir Mist Alert project we will replace this number with air quality sensor data.

One reply on “Monitoring Air Quality data with ThingSpeak using an ESP8266 module”
Very exciting and explained nicely