A real-time GPS tracker and speedometer system built for the Seeed XIAO ESP32-C3 with OLED display and CAN bus communication capabilities.
- GPS Tracking: Real-time GPS coordinate logging with speed measurement
- OLED Display: Live speed display with lap timing visualization
- CAN Bus Communication: Broadcasts GPS data over CAN network
- Real-time Updates: Continuous GPS data processing and display updates
- Lap Time Tracking: Visual representation of relative lap times
- High Precision: 7 decimal place GPS coordinate accuracy
- Seeed XIAO ESP32-C3 development board
- 128x64 OLED Display (SSD1306) connected via I2C
- GPS Module with UART communication (38400 baud)
- MCP2515 CAN Bus Module for CAN communication
- Connecting wires and breadboard/PCB
- RX Pin: D3 (GPIO 4)
- TX Pin: D2 (GPIO 3)
- Baud Rate: 38400
- SCL: Pin 7 (GPIO 7)
- SDA: Pin 6 (GPIO 6)
- CS Pin: D7 (GPIO 10)
- CAN Speed: 1 Mbps
The project uses PlatformIO with the following libraries:
lib_deps =
olikraus/U8g2@^2.35.17 # OLED display library
mikalhart/TinyGPSPlus@^1.0.3 # GPS parsing library
Additional included library:
- Arduino_CAN_BUS_MCP2515 (included in
/lib/
folder)
-
Clone the repository
git clone <repository-url> cd esp-oled-can-gps
-
Install PlatformIO
- Install PlatformIO IDE or CLI
-
Build and Upload
pio run --target upload
-
Monitor Serial Output
pio device monitor
βββ platformio.ini # PlatformIO configuration
βββ src/
β βββ main.cpp # Main application logic
β βββ CAN.cpp # CAN bus communication
β βββ display.cpp # OLED display functions
βββ include/
β βββ config.h # Hardware configuration
β βββ CAN.h # CAN function declarations
β βββ display.h # Display function declarations
β βββ animation.h # Animation definitions
βββ lib/
β βββ Arduino_CAN_BUS_MCP2515-1.0.0/ # CAN bus library
βββ test/
βββ test.csv # Sample GPS NMEA data
The system broadcasts GPS data over CAN bus using the following message structure:
- Bytes 0-3: Latitude (32-bit fixed point, 7 decimal places)
- Bytes 4-7: Longitude (32-bit fixed point, 7 decimal places)
- Bytes 0-3: Time and date information
- Bytes 4-7: Additional time data
- Speed: GPS speed in km/h
- Altitude: GPS altitude in meters
- Course: True course in degrees
- HDOP: Horizontal dilution of precision
- Satellites: Number of satellites in view
The OLED display shows:
- Large Speed Display: Current speed in km/h (up to 99.9 km/h)
- Lap Time Bar: Visual representation of relative lap timing
- Loading Screen: GPS connection status
- Direction Indicator: Shows positive/negative lap time direction
Key configuration parameters in config.h
:
#define SPI_CS_PIN D7 // CAN bus CS pin
uint32_t CAN_SEND_ID = 0x680; // CAN transmission ID
uint32_t CAN_RECEIVE_ID = 0x30A; // CAN reception ID
-
CAN Bus Initialization Fails
- Check SPI connections
- Verify CS pin configuration
- Ensure proper power supply
-
No GPS Signal
- Check antenna connection
- Verify UART wiring (RX/TX)
- Test in open sky conditions
-
Display Not Working
- Verify I2C connections
- Check display power supply
- Confirm correct I2C address
Monitor the serial output at 115200 baud for debugging:
- CAN bus initialization status
- GPS data parsing information
- System status messages
Check if you are affected by this problem
This project is part of the Remmi team development. Please check with the team for licensing information.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For issues and questions:
- Check the troubleshooting section
- Review the serial monitor output
- Contact the Remmi team
Built with β€οΈ by the Remmi Team