n.n

Dependencies:   mbed GPS

main.cpp

Committer:
QuangAnhLe
Date:
2019-08-05
Revision:
0:19357c8e66e0

File content as of revision 0:19357c8e66e0:

#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);
              }*/
        
    }
}