2020_8_30 他からライブラリを引っ張ってきた.

Dependencies:   mbed GPS_Interface

main.cpp

Committer:
falconsyunya
Date:
2020-08-30
Revision:
5:5d7e7cf9210a
Parent:
3:c28d0590adc5

File content as of revision 5:5d7e7cf9210a:

#include "mbed.h"
#include "GPS.h"

GPS gps(PA_9, PA_10);       // TX, RX
Serial pc(USBTX, USBRX);    // TX, RX
DigitalOut led1(LED1);

int main() {
    while(1){
    gps.getgps();
    int a = (float)(gps.longtitude-135.0)*1000000;
    int b = (float)(gps.latitude-34.0)*1000000;
    if(a==NULL)a=0;
    if(b==NULL)b=0;
    pc.printf("%d,%d\r\n",a,b);
    }
}