GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsHard-coding a Wi-Fi password in a sketch means re-flashing every time the router changes. The WiFiManager library solves this: if the ESP32 cannot join a saved network it starts a hotspot and a setup page, you choose your home network and type the password on your phone, and it saves them in flash. This project adds a DHT22 so the finished node serves its temperature and humidity as a tiny web page. Hold the BOOT button at start-up to wipe the saved network.
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.
weather_portal.inoVerify & upload in Electrolark#include <WiFi.h>
#include <WiFiManager.h>
#include <WebServer.h>
#include <DHT.h>
DHT dht(4, DHT22);
WebServer server(80);
void sendReading() {
float t = dht.readTemperature(), h = dht.readHumidity();
String json = "{\"temperature\":" + String(t, 1) + ",\"humidity\":" + String(h, 0) + "}";
server.send(200, "application/json", json);
}
void setup() {
Serial.begin(115200);
dht.begin();
pinMode(0, INPUT_PULLUP); // BOOT button
WiFiManager wm;
if (digitalRead(0) == LOW) wm.resetSettings(); // hold BOOT while resetting to forget the network
if (!wm.autoConnect("GB-Weather-Setup")) ESP.restart();
Serial.print("Open http://"); Serial.println(WiFi.localIP());
server.on("/", sendReading);
server.begin();
}
void loop() { server.handleClient(); }
Open a browser and go to 192.168.4.1 while connected to the GB-Weather-Setup hotspot.
Use a 2.4 GHz network and check the password. Hold BOOT during reset to wipe it and try again.
Check the DHT22 wiring and that its data pin goes to GPIO 4.
In the ESP32's flash memory, in plain form. Anyone with the board can read it, so use it on your own network only.
Hold the BOOT button while resetting to wipe it, then repeat the setup.
Yes. See the WebSocket live graph project for a browser chart.
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 intermediate project and takes about 1.5 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (weather_portal.ino).
About ₹585 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Using a captive portal to set Wi-Fi without re-flashing; Saving settings in flash; Serving a JSON reading from 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.