Generation 2 of the Harp project
Dependencies: Servo TMP36 GZ chan_fatfs_sd buffered-serial1 nmea_parser watchdog mbed-rtos mbed
main.cpp
- Committer:
- tylerjw
- Date:
- 2012-02-22
- Revision:
- 0:ce5f06c3895f
- Child:
- 1:2ace7946a246
File content as of revision 0:ce5f06c3895f:
#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.get_dec_longitude(), gps.get_dec_latitude()); pc.printf("%d satelites used\n", gps.get_satelites()); pc.printf("altitude = %f M\n\n", gps.get_msl_altitude()); } else { pc.printf("Oh Dear! No lock :(\n"); } } }