Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (28 sloc) 696 Bytes
#include "MC20_Common.h"
#include "MC20_Arduino_Interface.h"
#include "MC20_GNSS.h"
GNSS gnss = GNSS();
void setup() {
SerialUSB.begin(115200);
// while(!SerialUSB);
gnss.Power_On();
SerialUSB.println("\n\rPower On!");
while(!gnss.open_GNSS(GNSS_DEFAULT_MODE)){
delay(1000);
}
SerialUSB.println("Open GNSS OK.");
}
void loop() {
if(gnss.getCoordinate()){
SerialUSB.print("GNSS: ");
SerialUSB.print(gnss.longitude, 6);
SerialUSB.print(",");
SerialUSB.println(gnss.latitude, 6);
SerialUSB.print(gnss.str_longitude);
SerialUSB.print(",");
SerialUSB.println(gnss.str_latitude);
} else{
SerialUSB.println("Error!");
}
delay(1000);
}
You can’t perform that action at this time.