I'm a beginner and i got this error and still not declared in the scope
please I need you helps thank you
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
float lat = 28.5458,lon = 77.1703; // create variable for latitude and longitude object
SoftwareSerial gpsSerial(3,4);//rx,tx
TinyGPS gps; // create gps object
void setup(){
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
Serial.begin(9600); // connect serial
//Serial.println("The GPS Received Signal:");
gpsSerial.begin(9600); // connect gps sensor
lcd.begin(16,2);
}
void loop(){
while(gpsSerial.available()){ // check for gps data
if(gps.encode(gpsSerial.read()))// encode gps data
{
gps.f_get_position(&lat,&lon); // get latitude and longitude
// display position
lcd.clear();
lcd.setCursor(1,0);
lcd.print("GPS Signal");
//Serial.print("Position: ");
//Serial.print("Latitude:");
//Serial.print(lat,6);
//Serial.print(";");
//Serial.print("Longitude:");
//Serial.println(lon,6);
lcd.setCursor(1,0);
lcd.print("LAT:");
lcd.setCursor(5,0);
lcd.print(lat);
//Serial.print(lat);
//Serial.print(" ");
lcd.setCursor(0,1);
lcd.print(",LON:");
lcd.setCursor(5,1);
lcd.print(lon);
}
}
String latitude = String(lat,6);
String longitude = String(lon,6);
Serial.println(latitude+";"+longitude);
delay(1000);
}
ERROR
sketch_sep30a:8:22: error: 'A1' was not declared in this scope
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
^
sketch_sep30a:8:25: error: 'A2' was not declared in this scope
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
^
C:\Users\Pangko\Desktop\arduino\Pull_project\sketch_sep30a\sketch_sep30a.ino: In function 'void setup()':
sketch_sep30a:11:22: error: 'A1' was not declared in this scope
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
^
sketch_sep30a:11:25: error: 'A2' was not declared in this scope
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
^
exit status 1
'A1' was not declared in this scope
Moderator edit:
</mark> <mark>[code]</mark> <mark>
</mark> <mark>[/code]</mark> <mark>
tags added. Illegible coloring removed.