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
- For details on how to use this in the compiler, see Importing Projects and Libraries in to the Compiler
Hardware
|
|
- Available from Sparkfun Electronics GlobalSat EM-406
Hello World!
|
|
| 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
| GPS | A GPS interface for reading from a Globalsat EM-406 GPS Module |
| Functions | |
| GPS | Create the GPS, connected to the specified serial port |
| sample | Sample the incoming GPS data, returning whether there is a lock |
| Variables | |
| longitude | The longitude (call sample() to set) |
| latitude | The latitude (call sample() to set) |
A GPS interface for reading from a Globalsat EM-406 GPS Module
class GPS
Create the GPS, connected to the specified serial port
GPS( PinName tx, PinName rx )
Sample the incoming GPS data, returning whether there is a lock
int sample()
The longitude (call sample() to set)
float longitude
The latitude (call sample() to set)
float latitude
- Full api at http://mbed.org/projects/cookbook/api/GPS/trunk
- Full source at http://mbed.org/projects/cookbook/svn/GPS/trunk
Resources
Datasheets
PCB Library and Footprint
The Eagle PCB repsitory can be found at the Eagle page.
The Library for the GPS module is
