Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- sarahmarshy
- Date:
- 2019-05-23
- Revision:
- 1:1497469db426
- Parent:
- 0:39b09b3d8731
- Child:
- 2:c8839c41737b
File content as of revision 1:1497469db426:
#include "mbed.h" #include "GroveGPS.h" GroveGPS gps; void read_gps() { char latBuffer[16], lonBuffer[16]; gps.getLatitude(latBuffer); gps.getLongitude(lonBuffer); // Utilize latitude and longitude values here printf("\r\nLatitude: %s\r\nLongitude: %s\r\n", latBuffer, lonBuffer); } int main() { EventQueue queue; queue.call_every(1000, read_gps); gps.start(); queue.dispatch(); }