Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP8266 GPS Speedometer with NEO-6M and 16x2 I2C LCD

View and Edit Project In Cirkit DesignerImage of ESP8266 GPS Speedometer with NEO-6M and 16x2 I2C LCD

Circuit Documentation

Summary

This circuit is a GPS Speedometer that uses a NEO-6M GPS module, a 16x2 I2C LCD, and an ESP8266 NodeMCU. The ESP8266 interfaces with both the GPS module and the LCD to read GPS data and display the speed on the LCD.

Component List

  1. GPS NEO-6M

    • Description: GPS module used to receive GPS data.
    • Pins: VCC, RX, TX, GND
  2. ESP8266 NodeMCU

    • Description: Microcontroller used to interface with the GPS module and the LCD.
    • Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN
  3. 16x2 I2C LCD

    • Description: LCD display used to show the speed.
    • Pins: GND, VCC, SDA, SCL

Wiring Details

GPS NEO-6M

ESP8266 NodeMCU

16x2 I2C LCD

Code Documentation

/*
 * GPS Speedometer using NEO-6M GPS Module, 16x2 I2C LCD, and ESP8266
 * This code reads GPS data from the NEO-6M module and displays the speed
 * on a 16x2 I2C LCD. The ESP8266 is used to interface with both modules.
 */

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>

// Initialize the LCD with I2C address 0x27
LiquidCrystal_I2C lcd(0x27, 16, 2);

// Initialize SoftwareSerial for GPS module
SoftwareSerial gpsSerial(D8, D7); // RX, TX

void setup() {
  // Start serial communication with GPS module
  gpsSerial.begin(9600);
  // Initialize the LCD
  lcd.begin();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("GPS Speedometer");
  delay(2000);
  lcd.clear();
}

void loop() {
  // Check if data is available from GPS module
  if (gpsSerial.available()) {
    // Read data from GPS module
    String gpsData = gpsSerial.readStringUntil('\n');
    // Parse GPS data to extract speed
    String speed = parseSpeed(gpsData);
    // Display speed on LCD
    lcd.setCursor(0, 0);
    lcd.print("Speed: ");
    lcd.print(speed);
    lcd.print(" km/h");
  }
  delay(1000); // Update every second
}

String parseSpeed(String gpsData) {
  // Dummy function to parse speed from GPS data
  // Replace with actual parsing logic
  return "0.0";
}

This code initializes the LCD and the GPS module, reads GPS data, parses the speed, and displays it on the LCD. The parseSpeed function is a placeholder and should be replaced with actual logic to extract speed from the GPS data.