Quang Anh Le
/
GPS_helloworld
n.n
Revision 0:19357c8e66e0, committed 2019-08-05
- Comitter:
- QuangAnhLe
- Date:
- Mon Aug 05 17:51:59 2019 +0000
- Commit message:
- 1.commit
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GPS.lib Mon Aug 05 17:51:59 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/fookies/code/GPS/#8f2e256775d7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Aug 05 17:51:59 2019 +0000 @@ -0,0 +1,40 @@ +#include "mbed.h" +#include "GPS.h" +#include <iostream> +#include <sstream> +#include <bitset> + +Serial pc(PA_2,PA_3); +GPS gps (PA_9 ,PA_10); + + +// output +void TraceInt(int param) +{ + pc.printf("%d\r\n",param); +} + +int main() { + pc.printf("Searching..."); + int i = 0; + pc.baud(9600); + + while(1) { + + TraceInt(i++); + wait(1); + /*if(gps.sample()){ + float latitude = gps.latitude; + float longitude = gps.longitude; + float utc = gps.utc + 50000; + pc.printf("latitude: %0.2f, longitude: %0.2f, utc: %f\r\n",latitude,longitude,utc); + pc.printf("Lock Found!!!!"); + wait(1); + } + else{ + pc.printf("No Lock Found!!!!"); + wait(1); + }*/ + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Aug 05 17:51:59 2019 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/235179ab3f27 \ No newline at end of file