GPS

This is the GlobalSat EM-406 GPS module with serial interface

Library

Import Library:

http://mbed.org/projects/cookbook/svn/GPS/trunk

Import Example program:

http://mbed.org/projects/cookbook/svn/GPS/examples/GPS

Hardware

source:/GPS/doc/GPSInterface.png source:/GPS/doc/GPSProduct.jpg

Hello World!

source:/GPS/doc/GPSSchematic.png source:/GPS/doc/GPSPhoto.jpg
Schematic Photo

#include "mbed.h"
#include "GPS.h"

Serial pc(USBTX, USBRX);
GPS gps(p9, p10);
int main() {
    while(1) {
        if(gps.sample()) {
            pc.printf("I'm at %f, %f\n", gps.longitude, gps.latitude);
        } else {
            pc.printf("Oh Dear! No lock :(\n");
        }
    }
}
Source Code of GPS.bin (LPC1768 LPC1768)

API

GPSA GPS interface for reading from a Globalsat EM-406 GPS Module
Functions
GPSCreate the GPS, connected to the specified serial port
sampleSample the incoming GPS data, returning whether there is a lock
Variables
longitudeThe longitude (call sample() to set)
latitudeThe latitude (call sample() to set)
class GPS
A GPS interface for reading from a Globalsat EM-406 GPS Module
GPS(PinName tx,
PinName rx)
Create the GPS, connected to the specified serial port
int sample()
Sample the incoming GPS data, returning whether there is a lock
float longitude
The longitude (call sample() to set)
float latitude
The latitude (call sample() to set)

Resources

Datasheets

PCB Library and Footprint

The Eagle PCB repsitory can be found at the Eagle page.

The Library for the GPS module is