Usage Example for Arduino-Read GPS Data

Last revision 2026/01/29

This guide demonstrates how to read GPS data using Arduino, detailing hardware setup, software requirements, connection diagrams, and sample code for successful data processing.

Hardware

Software

Connection Diagram

TEL0132-Connection-Read GPS Data

UNO R3 PIN GPS + BDS BeiDou Dual Module PIN
UNO R3 VCC GPS + BDS BeiDou Dual Module VCC
UNO R3 GND GPS + BDS BeiDou Dual Module GND
UNO R3 D11 GPS + BDS BeiDou Dual Module TX
UNO R3 D12 GPS + BDS BeiDou Dual Module RX

Sample Code (Read GPS Data)

#include <SoftwareSerial.h> 
SoftwareSerial GpsSerial(11, 12); //RX,TX

void setup()
{   
  Serial.begin(115200);  //Debug Serial 
  GpsSerial.begin(9600);  //Gps Serial   
} 

void loop()
{  while (GpsSerial.available() > 0)
  { 
    byte gpsData = GpsSerial.read(); 
   Serial.write(gpsData); 
  }
}

Expected Results

Read GPS Data

Was this article helpful?

TOP