Etek EB-85A GPS Example Code

etekgps5hz-02-m.jpg

Here’s some example Arduino code for getting a Etek EB-85A module up and reading latitude and longitude (will probably work with most GPS modules). You can purchase a module from Sparkfun.

The module only needs power, ground, rx and tx. Most modules like the Etek start sending NMEA strings as soon as it has power. The Etek module takes a minute or two to get a satellite fix from a cold start in urban environments. Signals drop out once in a while between tall buildings at street level even with DGPS and SBAS. On a clear day, if you’re lucky, you can get a signal sitting by the window in urban canyons.

//Etek GPS EB-85A Module Example
//by Che-Wei Wang and Kristin O'Friel
//32 Channel etek GPS unit
//modified from original code by Igor González Martín. http://www.arduino.cc/playground/Tutorials/GPS
boolean startingUp=true;
boolean gpsConnected=false;
boolean satelliteLock=false;

long myLatitude,myLongitude;

//GPS
#include 
#include 
int rxPin = 0;                    // RX PIN 
int txPin = 1;                    // TX TX
int byteGPS=-1;
char linea[300] = "";
char comandoGPR[7] = "$GPRMC";
int cont=0;
int bien=0;
int conta=0;
int indices[13];

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void setup() {
  //GPS
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);

  for (int i=0;i

3 comments

  1. You may want to credit the source of the code you used to read in the serial data. I believe Jordii wrote it as open source, but citing his efforts would probably be in the best interest of what you are doing.

Comments are closed.