}
It is showing this output
Arduino: 1.8.12 (Mac OS X), Board: "Arduino Uno"
code_for_Gps_clock.ino: In function 'void loop()':
test_code_for_Gps_clock:60:3: error: expected '}' at end of input
}
^
exit status 1
expected '}' at end of input
Please follow the advice given in the link below when posting code. Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
I'm not surprised.
If you press Ctrl-T in the Arduino editor, you might also spot the problem you have with your curly braces ("}"). I can confirm you've got one too many somewhere, and possibly additional problems as well.
If you Auto Format your code in the IDE you will see that you have code outside of any function, as here
void loop()
{
char c = GPS.read();
if ((c) && (GPSECHO))
Serial.write(c);
if (GPS.newNMEAreceived())
{
if (!GPS.parse(GPS.lastNMEA()))
{
return;
}
}
}
if (millis() - timer > 2000)
{
timer = millis();
//an so on
Are you sure that you posted the code that caused the error in the topic title ?
No, you can't add a leading zero to an integer like that. You have to do it in the place where you convert the number to characters, like in Serial.print():