GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsShow notifications sent from a phone on the OLED, keeping the most recent few and marking them as read. Handling strings on a board with 2 KB of RAM needs discipline. Incoming text is trimmed to a fixed maximum, only three notifications are kept, and the oldest is discarded when a fourth arrives. The unread flag drives the LED, which means the notification survives being missed, the light stays on until someone acknowledges it, which is the whole point of a notifier.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin.
Every part for this build comes in the Geekobot Titan Kit box, a Geekobot exclusive, together with the parts for all 120 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
ESP32 DevKit V1 (38-pin): the brain of every Titan Kit project, with Wi-Fi and Bluetooth
Male-to-female and female-to-female leads for the modules
LEDs from the kit's red, green, yellow and blue packs
220 ohm resistors: one in series with every LED
HC-05 Bluetooth module: a serial link to your phone
ESP32 expansion board from the kit: every GPIO has its own S, V, G header
Follow the colours: red is power, dark grey is ground, blue is a signal.
titan_kit_086_bluetooth_notification.inoVerify & upload in Electrolark#include <HardwareSerial.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SLOTS 3
#define MAX_LENGTH 40
HardwareSerial bt(2); // UART2: RX on GPIO16, TX on GPIO17
Adafruit_SSD1306 display(128, 64, &Wire, -1);
int led = 25;
int buzzer = 33;
int readButton = 27;
String messages[SLOTS];
unsigned long arrived[SLOTS];
bool unread[SLOTS];
int count = 0;
String input = "";
int totalReceived = 0;
void addMessage(String text)
{
if (text.length() > MAX_LENGTH)
{
text = text.substring(0, MAX_LENGTH);
}
if (count >= SLOTS)
{
for (int i = 0; i < SLOTS - 1; i++)
{
messages[i] = messages[i + 1];
arrived[i] = arrived[i + 1];
unread[i] = unread[i + 1];
}
count = SLOTS - 1;
}
messages[count] = text;
arrived[count] = millis() / 1000;
unread[count] = true;
count = count + 1;
totalReceived = totalReceived + 1;
tone(buzzer, 1600, 120);
delay(140);
tone(buzzer, 2000, 120);
bt.println("Notification displayed");
Serial.println(text);
}
bool anyUnread()
{
for (int i = 0; i < count; i++)
{
if (unread[i]) return true;
}
return false;
}
void setup()
{
pinMode(led, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(readButton, INPUT_PULLUP);
bt.begin(9600, SERIAL_8N1, 16, 17);
Serial.begin(9600);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { while (true) { } }
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1);
bt.println("Send any text to display it as a notification");
}
void loop()
{
while (bt.available())
{
char c = bt.read();
if (c == '\n')
{
input.trim();
if (input.length() > 0) addMessage(input);
input = "";
}
else if (c != '\r')
{
input = input + c;
}
}
if (digitalRead(readButton) == LOW)
{
for (int i = 0; i < count; i++) unread[i] = false;
Serial.println("All marked read");
delay(300);
}
digitalWrite(led, anyUnread() && (millis() / 500) % 2);
display.clearDisplay();
display.fillRect(0, 0, 128, 11, SSD1306_WHITE);
display.setTextColor(SSD1306_BLACK);
display.setCursor(2, 2);
display.print("NOTIFICATIONS ");
display.print(totalReceived);
display.setTextColor(SSD1306_WHITE);
if (count == 0)
{
display.setCursor(0, 28);
display.print("No messages yet");
}
else
{
for (int i = count - 1; i >= 0; i--)
{
int row = count - 1 - i;
int y = 14 + row * 17;
display.setCursor(0, y);
display.print(unread[i] ? "* " : " ");
display.print(messages[i].substring(0, 19));
if (messages[i].length() > 19)
{
display.setCursor(12, y + 8);
display.print(messages[i].substring(19, 38));
}
else
{
display.setCursor(12, y + 8);
display.print(arrived[i]);
display.print("s ago");
}
}
}
display.display();
}
Use a micro-USB data cable (some cables only charge), install the CP210x or CH340 driver if no port appears, pick Tools > Board > ESP32 Dev Module and hold the BOOT button on the board until the upload starts.
Turn it round: the long leg (anode) goes to the GPIO side through the 220 ohm resistor, the short leg to GND.
The sketch uses INPUT_PULLUP, so one leg goes to the GPIO and the other to GND. Use two legs on opposite sides of the button.
This project needs the passive buzzer (the one that plays notes), not the active one.
Handling strings on a board with 2 KB of RAM needs discipline. Incoming text is trimmed to a fixed maximum, only three notifications are kept, and the oldest is discarded when a fourth arrives. The unread flag drives the LED, which means the notification survives being missed, the light stays on until someone acknowledges it, which is the whole point of a notifier.
Send Meeting at 3pm from the phone and it appears at the top of the list. A two-tone chime sounds and the LED blinks while anything is unread. Send more messages and the oldest scrolls off after three.
Yes. It is project 86 of 120 in the Geekobot Titan Kit, in level 13 (Bluetooth). Every part on the list comes in the kit box, and you can also buy the parts one by one from the list above.
No. Every Titan Kit project is wired on the ESP32 expansion board and the breadboard with jumper wires.
11 parts: ESP32-WROOM-32 38-Pin Development Board, USB Cable, Solderless Breadboard, Dupont Jumper Wires (40 pcs), Through-Hole LED Pack (Pack of 10), Carbon Film Resistor 1/4W 5% (Pack of 10), Tactile Push Button Switch, Buzzer Module 3.3–5V, 0.96" OLED Display 128x64, HC-05 6-Pin Bluetooth Serial Module with Button, plus 1 more. 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 45 minutes. The build on this page has 8 steps.
No. This page has the complete, tested code (titan_kit_086_bluetooth_notification.ino).
About ₹1,084 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
String handling over Bluetooth; Managing limited RAM with fixed-length strings; Unread flags that persist until acknowledged; Wrapping long text across two lines.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin.
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.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.