hi i am trying to interface an arduino UNO R3 with a NEO-6M GPS module with the following code, can anyone help?
/*
- Rui Santos
- Complete Project Details https://randomnerdtutorials.com
*/
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
void setup(){
Serial.begin(9600);
ss.begin(GPSBaud);
}
void loop(){
// This sketch displays information every time a new sentence is correctly encoded.
while (ss.available() > 0){
gps.encode(ss.read());
if (gps.location.isUpdated()){
Serial.print("Latitude= “);
Serial.print(gps.location.lat(), 6);
Serial.print(” Longitude= ");
Serial.println(gps.location.lng(), 6);
}
}
}
And im getting these error messages…
Arduino: 1.8.13 (Windows 10), Board: “Arduino Uno”
C:\Users\joshh\AppData\Local\Temp\cceTINse.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_sketch_feb14a.ino.cpp.o.1961’:
:(.text.startup+0x134): undefined reference to `TinyGPSPlus::TinyGPSPlus()’
C:\Users\joshh\AppData\Local\Temp\cceTINse.ltrans0.ltrans.o: In function `loop’:
C:\Users\joshh\AppData\Local\Temp\arduino_modified_sketch_493503/sketch_feb14a.ino:26: undefined reference to `TinyGPSPlus::encode(char)’
C:\Users\joshh\AppData\Local\Temp\arduino_modified_sketch_493503/sketch_feb14a.ino:29: undefined reference to `TinyGPSLocation::lat()’
C:\Users\joshh\AppData\Local\Temp\arduino_modified_sketch_493503/sketch_feb14a.ino:31: undefined reference to `TinyGPSLocation::lng()’
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.
any advice would be greatly appreciated