Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "TinyGPS.h"
- TinyGPS gps;
- void setup() {
- Serial.begin(4800);
- }
- void loop() {
- while (Serial.available()) {
- int c = Serial.read();
- gps.encode(c);
- Serial.println("oh no, I'm never gonna exit this while loop");
- }
- long latitude, longitude;
- gps.get_position(&latitude, &longitude, NULL);
- Serial.print("Latitude: "); Serial.println(latitude);
- Serial.print("Longitude: "); Serial.println(longitude);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement