GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsThingSpeak is a free service that stores numbers you send it over HTTP and draws charts. The ESP32 reads a DHT22 and sends the temperature and humidity to your channel using its write API key. The free tier accepts an update about once every 15 seconds, so one a minute is comfortable. Keep the write key private, because anyone who has it can add data to your channel.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB phone charger.
thingspeak_logger.inoVerify & upload in Electrolark#include <WiFi.h>
#include <HTTPClient.h>
#include <DHT.h>
const char* SSID = "YOUR_WIFI";
const char* PASS = "YOUR_PASSWORD";
const char* API_KEY = "YOUR_WRITE_KEY";
DHT dht(4, DHT22);
void setup() {
Serial.begin(115200);
dht.begin();
WiFi.begin(SSID, PASS);
while (WiFi.status() != WL_CONNECTED) delay(300);
}
void loop() {
float t = dht.readTemperature();
float h = dht.readHumidity();
if (!isnan(t) && !isnan(h)) {
HTTPClient http;
String url = "http://api.thingspeak.com/update?api_key=" + String(API_KEY) +
"&field1=" + String(t, 1) + "&field2=" + String(h, 1);
http.begin(url);
int code = http.GET();
Serial.printf("t=%.1f h=%.1f http=%d\n", t, h, code);
http.end();
}
delay(60000);
}
The ESP32 is not connected to Wi-Fi or cannot reach the internet.
You sent updates too fast. Keep at least 15 seconds between updates.
Check the DHT22 wiring and that DATA goes to GPIO 4.
There is a free tier with limits on messages per year. Check their current terms.
Yes, up to 8 per channel: field3, field4 and so on.
It is fine for weather data. Do not send anything private this way.
4 parts: ESP32-WROOM-32 38-Pin Development Board, DHT22 AM2302 Digital Temperature & Humidity Sensor, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a beginner project and takes about 1 hour. The build on this page has 6 steps.
No. This page has the complete, tested code (thingspeak_logger.ino).
About ₹585 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Making an HTTP request from the ESP32; Using a ThingSpeak write API key; Reading a DHT22.
Ideas that reuse this build: ESP32 MQTT temperature dashboard. They are listed under Take it further on this page.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Learning project. Check every circuit and the datasheet of each part before you power it up.