Using the SKYLAB SKM53 Module is quite easy, but you need to pay special attention
to the RX and TX. RX on Arduino goes to TX on GPS module. Default baud on this GPS
is 9600. I found I could not get the GPS to connect without external power which is
3.3v but I have been running it from 5v and it seems ok.
Code from renkema.cc with some modification.
Arduino code…
/*
This Sketch will run with the SkyNav SKM53 GPS
RXD Arduino Pin 3
TXD Arduino Pin 2
RST Leave Open
NC Leave Open
GND Ground
VCC +5
Make sure you download and save to your Arduino/Libraries folder TinyGPS.h
and NewSoftSerial.h files.
*/
#include <TinyGPS.h>
#include <SoftwareSerial.h>
unsigned long fix_age;
SoftwareSerial GPS(2,3);
TinyGPS gps;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
long lat, lon;
float LAT, LON;
void setup(){
GPS.begin(9600);
Serial.begin(96
00);
}
void loop(){
long lat, lon;
unsigned long fix_age, time, date, speed, course;
unsigned long chars;
unsigned short sentences, failed_checksum;
// retrieves +/- lat/long in 100000ths of a degree
gps.get_position(&lat, &lon, &fix_age);
getGPS();
Serial.print("Latitude : ");
Serial.print(LAT/100000,7);
Serial.print(" :: Longitude : ");
Serial.println(LON/100000,7);
}
void getGPS(){
bool newdata = false;
unsigned long start = millis();
// Every 1 seconds we print an update
while (millis() - start < 1000)
{
if (feedgps ()){
newdata = true;
}
}
if (newdata)
{
gpsdump(gps);
}
}
bool feedgps(){
while (GPS.available())
{
if (gps.encode(GPS.read()))
return true;
}
return 0;
}
void gpsdump(TinyGPS &gps)
{
//byte month, day, hour, minute, second, hundredths;
gps.get_position(&lat, &lon);
LAT = lat;
LON = lon;
{
feedgps(); // If we don't feed the gps during this long routine, we may drop characters and get checksum errors
}
}
[...] http://competefornothing.com/?p=113 [...]
Where did you get this gps from?
Thanks
I get my SKM53 GPS Modules from goodluckbuy or gadgetinfinite ebay seller (same company) usually for around $24 US.
Thanks Warren.
Hi Warren,
Could you please what logic levels you used to communicate with this module as I read in the data sheet that it uses 2.85V LVTTL logic levels. Did you have to do any logic level shifting? Also could you clarify how you powered the gps? Did you use the Arduino’s 5V source?
Cheers.
Hey mate,
I did not do any logic level shifting. I powered the GPS using http://competefornothing.com/?p=167
Hey Warren,
What voltage are you running your Arduino at? I am assuming 3.3V?
Cheers.
I personally run both the SKM53 and the Arduino from the same L7805 Voltage Regulator.
Hey Warren,
What kind of Arduino are you using?
Cheers mate.
I have used it on the Arduino Nano, Uno and Mega. I haven’t used it on the leonardo yet as it is a pain getting it going in windows 8.