GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsOnce an ESP32 is fixed to a wall or inside a box, plugging in a cable to change the code is a nuisance. ArduinoOTA lets the Arduino IDE upload a sketch over Wi-Fi. The first upload must be by USB; every later upload can be wireless. This project shows an upload progress bar on an OLED, and it protects the update with a password so no one else on your network can overwrite your board.
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.
ota.inoVerify & upload in Electrolark#include <WiFi.h>
#include <ArduinoOTA.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>
const char* WIFI_NAME = "YOUR_WIFI";
const char* WIFI_PASS = "YOUR_PASSWORD";
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
void say(const String &a, const String &b = "") {
oled.clearDisplay(); oled.setTextColor(WHITE); oled.setTextSize(1);
oled.setCursor(0, 0); oled.println(a); oled.setCursor(0, 16); oled.println(b); oled.display();
}
void setup() {
Wire.begin(21, 22);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
say("Connecting...");
WiFi.begin(WIFI_NAME, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) delay(300);
ArduinoOTA.setHostname("gb-ota");
ArduinoOTA.setPassword("change-this-password");
ArduinoOTA.onStart([]() { say("Updating..."); });
ArduinoOTA.onProgress([](unsigned int done, unsigned int total) {
int w = (done * 120) / total;
oled.drawRect(4, 40, 120, 10, WHITE);
oled.fillRect(4, 40, w, 10, WHITE);
oled.display();
});
ArduinoOTA.onEnd([]() { say("Done, restarting"); });
ArduinoOTA.begin();
say("Ready: gb-ota", WiFi.localIP().toString());
}
void loop() { ArduinoOTA.handle(); }
The computer and ESP32 must be on the same network, and the computer's firewall must allow the IDE. Restart the IDE.
The password in the IDE prompt must match setPassword exactly.
Upload once more by USB cable. The sketch you uploaded had no OTA code.
With a password and a trusted home network, yes for hobby use. Do not expose it to the internet.
Yes, with the HTTPUpdate or a web upload page, which is a good next step.
Yes, but keep the board awake long enough to receive the upload, which deep sleep prevents.
4 parts: ESP32-WROOM-32 38-Pin Development Board, 0.96" OLED Display 128x64, 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 hour. The build on this page has 6 steps.
No. This page has the complete, tested code (ota.ino).
About ₹595 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Enabling ArduinoOTA; Using a password to protect uploads; Showing progress on an OLED.
Ideas that reuse this build: ESP32 OLED internet clock. 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.