Arquivo de etiquetas: gps

Module GP-20U7 / GP20U7 – GPS Example with arduino

GP-20U7 is a low-cost GPS module available in SparkFun (check it here).

The GP-20U7 is useful for mobile application, autonomous vehicles and many other applications that requires geographical positioning data.

It requires a 3.3V power supply and a UART port to communicate with your processor (more details on datasheet).

This example was implemented with arduino UNO and the following pins were assigned:

  • Vcc pin from GP-20U7 to 3.3V on arduino
  • GND from GP-20U7 to GND on arduino
  • TX from GP-20U7 to PIN10 on arduino

Below is the code implemented:

// GPS Module - GP-20U7 - Arduino Example Algorithm
//
// Author: Gustavo Bertoli
//
// References:
// https://cdn.sparkfun.com/datasheets/GPS/GP-20U7.pdf
// https://www.arduino.cc/en/Reference/SoftwareSerial
// http://forum.arduino.cc/index.php?topic=288234.0
// 

#include <SoftwareSerial.h> 

SoftwareSerial GPS_Serial(10, 11); // RX, TX

void setup() {
  Serial.begin(9600);
  GPS_Serial.begin(9600); 
}

void loop() {
   char rc;

   if (GPS_Serial.available()){
        rc = GPS_Serial.read();
        Serial.write(rc);
   }
}

And the output:

GPS GP-20U7 - arduino output
GPS GP-20U7 – arduino output