LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsA GPS module sends text sentences over a serial line once a second. The TinyGPSPlus library decodes them into speed, position, time and satellite count. The ESP32 has spare hardware serial ports, so the GPS connects to a second UART and the USB serial stays free for debugging. Speed from GPS is smooth and accurate on the move, but wobbles when standing still.
Do not look at a display while driving. Fix it in place and let a passenger watch it.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB power bank for carrying it around.
gps_speedometer.inoVerify & upload in Electrolark#include <TinyGPSPlus.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>
TinyGPSPlus gps;
HardwareSerial GPSser(2);
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
void setup() {
GPSser.begin(9600, SERIAL_8N1, 16, 17); // RX2 = 16, TX2 = 17
Wire.begin(21, 22);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop() {
while (GPSser.available()) gps.encode(GPSser.read());
static unsigned long last = 0;
if (millis() - last < 500) return;
last = millis();
oled.clearDisplay(); oled.setTextColor(WHITE);
oled.setTextSize(1); oled.setCursor(0, 0);
oled.print("Sats "); oled.print(gps.satellites.value());
if (gps.time.isValid()) {
int total = gps.time.hour() * 60 + gps.time.minute() + 330; // UTC+5:30
total %= 1440;
oled.print(" "); oled.printf("%02d:%02d", total / 60, total % 60);
}
oled.setTextSize(3); oled.setCursor(0, 20);
if (gps.speed.isValid()) oled.print(gps.speed.kmph(), 0); else oled.print("--");
oled.setTextSize(1); oled.setCursor(0, 54); oled.print("km/h");
oled.display();
}
Take it outdoors. Indoors the module rarely sees satellites.
Swap the TX and RX wires. GPS TX goes to ESP32 RX.
Normal. Ignore speeds below 2 km/h.
Usually within 1 to 2 km/h when moving.
Yes. Write latitude and longitude to a file with the LittleFS project's approach.
No. GPS works without any network.
5 parts: ESP32-WROOM-32 38-Pin Development Board, DFRobot Gravity GNSS GPS BeiDou Receiver Module – I2C & UART, 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.5 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (gps_speedometer.ino).
About ₹2,454 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Using a second hardware serial port; Decoding NMEA with TinyGPSPlus; Converting UTC to Indian time.
Do not look at a display while driving. Fix it in place and let a passenger watch it.
Ideas that reuse this build: ESP32 LittleFS data logger. They are listed under Take it further on this page.
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
See the smoke level live on a crisp screen and get a loud warning when it spikes.
An infrared eye that spots an open flame and raises the alarm.
Walk into the room and it sounds the alarm: the classic first security build.
Learning project. Check every circuit and the datasheet of each part before you power it up.