This example's program for communication with Locosys GPS module model 1590R-A. Reference: https://sites.google.com/site/domediy/gpstest

Dependencies:   GPS PowerControl mbed

Fork of GPS_HelloWorld by Simon Ford

main.cpp

Committer:
udomsak
Date:
2013-09-27
Revision:
1:39b2575a0211
Parent:
0:6b7345059afe

File content as of revision 1:39b2575a0211:

#include "mbed.h"
#include "GPS.h"
#include "PowerControl/EthernetPowerControl.h"

Serial pc(USBTX, USBRX);
GPS gps(p9, p10);

int main() {
  PHY_PowerDown();
    while(1) {
        if(gps.sample()) {
            pc.printf("I'm at %f, %f\n\r", gps.longitude, gps.latitude);
        } else {
            pc.printf("Oh Dear! No lock :(\n");
        }
    }
}