Skip to content

Instantly share code, notes, and snippets.

@tamberg
Created December 20, 2016 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamberg/1978374ffb6148bea9f25f9c3c5e7992 to your computer and use it in GitHub Desktop.
Save tamberg/1978374ffb6148bea9f25f9c3c5e7992 to your computer and use it in GitHub Desktop.
GpsMinimal
void setup() {
Serial1.begin(9600);
Serial.begin(115200);
Serial.println("Hello, GPS!");
}
void loop() {
//Serial1.find("$GPGLL,");
Serial1.find("$GPRMC,");
int i = 0;
while (i < 6) {
if (Serial1.available()) {
int b = Serial1.read();
if (b == ',') { i++; }
Serial.write(b);
}
}
Serial.println();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment