![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
FRDM-K64F+NEO-6M-GPS Serial GPS Add Beijing time format
Revision 0:52831af60170, committed 2016-08-12
- Comitter:
- sampleCode
- Date:
- Fri Aug 12 08:16:18 2016 +0000
- Commit message:
- gps;
Changed in this revision
diff -r 000000000000 -r 52831af60170 GPS.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GPS.lib Fri Aug 12 08:16:18 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/sampleCode/code/NEO-6m-GPS/#7350eda5fa8c
diff -r 000000000000 -r 52831af60170 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Aug 12 08:16:18 2016 +0000 @@ -0,0 +1,18 @@ +/* Example showing how to hook up to different GPS modules (GlobalSat neo-6m)*/ +#include "mbed.h" +#include "GPS.h" +//create usb serial +Serial pc(USBTX, USBRX); +//creat gps serial baud is 9600 +GPS gpsAda(PTC15, PTC14, 9600); + +int main() +{ + while (1) { + if(gpsAda.sample()){ + pc.printf("%f\t%c\t%f\t%c\t%f\t%f\t%f\n\r",gpsAda.longitude, gpsAda.ns,gpsAda.latitude,gpsAda.ew, gpsAda.alt, gpsAda.geoid, gpsAda.time); + pc.printf("%d:%d:%d",gpsAda.hour,gpsAda.minute,gpsAda.seconed); + } + } + +} \ No newline at end of file
diff -r 000000000000 -r 52831af60170 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Aug 12 08:16:18 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/f9eeca106725 \ No newline at end of file