Example code for reading from a serial GPS unit & parsing an RMC GPS string to a struct.
Fork of mbed_blinky by
Diff: main.cpp
- Revision:
- 20:a728f1075fb1
- Parent:
- 18:7ba014531492
diff -r cbacec32ae4b -r a728f1075fb1 main.cpp --- a/main.cpp Thu Mar 09 22:31:06 2017 +0000 +++ b/main.cpp Tue Mar 14 21:22:36 2017 +0000 @@ -5,6 +5,8 @@ Serial pc(USBTX, USBRX); // tx, rx Serial xgps(PTC15, PTC14); +// If using MODSERIAL (as part of the WNC Interface for the AT&T IoT Starter Kit): +// MODSERIAL xgps(PTC15, PTC14, GPSBUFFSIZE, GPSBUFFSIZE); unsigned gpsSentenceIndex = 0; char gpsSentence[GPSBUFFSIZE];