1 #include <Adafruit_GPS.h>
2 #include <SoftwareSerial.h>
3 Adafruit_GPS GPS(&Serial1);
5 // Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console
6 // Set to 'true' if you want to debug and listen to the raw GPS sentences
9 // this keeps track of whether we're using the interrupt
11 boolean usingInterrupt = false;
16 // connect at 115200 so we can read the GPS fast enuf and
19 Serial.println("Adafruit GPS logging dump test!");
21 // 9600 NMEA is the default baud rate for MTK - some use 4800
24 GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_OFF);
26 while (Serial1.available())
30 GPS.sendCommand("$PMTK622,1*29");
31 Serial.println("----------------------------------------------------");
35 void loop() // run over and over again
37 if (Serial1.available()) {
38 char c = Serial1.read();
39 if (c) Serial.print(c);