Hi,
So I have linked my GPS with the Shield (GPS-10710 ROHS) on my Arduino. With a Breadboard, I've connected the Arduino to the LCD (16x2). And then I upload the sketch which works perfectly on the serial monitor, the LCD doesn't display coordinates. I've tested the LCD and he can display. I don't understand why my LCD doesn't display the data and if someone could answer me I would really appreciate that.
There is my code :
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
TinyGPS gps;
SoftwareSerial GPS10710(2, 3);
LiquidCrystal lcd(12, 11, 5, 4, 6, 7);
void setup()
{
lcd.begin(16, 2);
Serial.begin(9600);
GPS10710.begin(4800);
Serial.println();
Serial.println("En attente des donnees...");
}
void loop()
{
while(GPS10710.available())
{
int c = GPS10710.read();
if(gps.encode(c))
{
float LAT, LONG;
delay(5000);
gps.f_get_position(&LAT, &LONG);
Serial.print("LAT / LONG : ");
Serial.print(LAT,5);
lcd.setCursor(0,0);
lcd.print(LAT,5);
lcd.setCursor(0,1);
lcd.print(LONG,5);
Serial.print(" / ");
Serial.println(LONG,5);
}
}
}
Serial Monitor :
Thanks in advance for all your answers.