GPS route logger
Records where you went every five seconds, ready to open on a map.
Shop by category
Shop all componentsThe NEO-6M works out position and speed from GPS satellites. The Nano shows speed in big digits, plus satellites in view, UTC time and altitude. Accurate to about 0.2 km/h once it has a fix.
Tick anything you already have and the total updates.
GPS receiver that outputs position, speed, altitude and UTC time once it sees at least 4 satellites.
Follow the colours: red is power, dark grey is ground, blue is a signal.
gps_speedometer.inoVerify & upload in Electrolark// GPS speedometer and clock
// Geekobot project library · board: Arduino Nano
// Wiring diagram, parts list and build steps: Geekobot project page "gps-speedometer"
#include <TinyGPSPlus.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SoftwareSerial.h>
// ---- pins ----
const uint8_t GPS_RX = 2;
const uint8_t GPS_TX = 3;
TinyGPSPlus gps;
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
SoftwareSerial gpsSerial(GPS_RX, GPS_TX);
unsigned long lastDraw = 0;
void setup() {
Serial.begin(115200);
if (!oled.begin(SSD1306_SWITCHCAPVCC, 0x3C)) Serial.println(F("OLED not found"));
oled.setTextColor(SSD1306_WHITE);
oled.clearDisplay();
oled.display();
gpsSerial.begin(9600);
}
void loop() {
while (gpsSerial.available()) gps.encode(gpsSerial.read());
if (millis() - lastDraw < 500) return;
lastDraw = millis();
oled.clearDisplay();
oled.setTextSize(1);
oled.setCursor(0, 0);
oled.print(F("Sats: "));
oled.print(gps.satellites.isValid() ? (int)gps.satellites.value() : 0);
if (gps.time.isValid()) {
char t[12];
snprintf(t, sizeof(t), " %02d:%02d UTC", gps.time.hour(), gps.time.minute());
oled.print(t);
}
oled.setCursor(0, 18);
oled.setTextSize(3);
if (gps.speed.isValid() && gps.location.isValid()) {
oled.print(gps.speed.kmph(), 0);
oled.setTextSize(1);
oled.print(F(" km/h"));
} else {
oled.setTextSize(1);
oled.print(F("Waiting for fix..."));
}
oled.setTextSize(1);
oled.setCursor(0, 54);
if (gps.altitude.isValid()) { oled.print(F("Alt ")); oled.print(gps.altitude.meters(), 0); oled.print(F(" m")); }
oled.display();
}
The sketch above runs here on a simulated Arduino Nano. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
GPS needs open sky. Test near a window or outside; the first cold start can take several minutes.
Check SDA/SCL and try address 0x3D. Run an I²C scanner to confirm.
Open the Serial Monitor at 115200 baud and check for messages. Make sure you chose the right board and port in the Arduino IDE.
Close other programs using the serial port, try another USB cable (some are charge-only) and press reset just before uploading.
Yes. Most of the code works unchanged on an ESP32 with the ESP32 board package. Watch for 5 V modules: ESP32 pins are 3.3 V, so 5 V output signals need a resistor divider.
Use a 5 V USB phone charger or a power bank into the board's USB port.
5 parts: Nano CH340 Development Board (Soldered), GY-NEO6MV2 GPS Module with u-blox NEO-6M & Antenna, 0.96" OLED Display 128x64 (I2C), Solderless Breadboard (830 points) and Dupont Jumper Wires (40 pcs). Tools: Digital Multimeter and Wire Stripper and Cutter. 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 2 hours. The build on this page has 7 steps.
No. This page has the complete, tested code (gps_speedometer.ino). Install these libraries first: TinyGPSPlus, Adafruit SSD1306 and Adafruit GFX Library.
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹768 for the parts at the prices on this page, plus tools if you do not have them. Quantity price breaks lower the cost when you build several.
Drawing text on an I²C display; NMEA sentences and GNSS fixes.
Ideas that reuse this build: Log your route to an SD card. They are listed under Take it further on this page.
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.
Soil moisture and room climate on your phone, with automatic watering and a manual override.
Learning project. Check every circuit and the datasheet of each part before you power it up.
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.