mrburnette:
You can easily see how the Adafruit GPS lib is used
Have you looked at NeoGPS yet? The Adafruit_GPS with SoftwareSerial is a particularly inefficient combination. Just for fun, I have attached a version of your sketch that uses NeoGPS and NeoSWSerial. The program size is about 1600 bytes smaller, and it uses 700 fewer bytes of RAM (only 575 used). :o
Other things to note:
* NeoGPS has flags to indicate that the date/time is not valid yet. If the GPS receiver does not have good reception, those fields will be empty. Maybe it's something you want to check and display a message?
* SoftwareSerial blocks all other code when RX chars are being received. That's not crucial for this app, since there is only one source of incoming data. If you have other apps with other input devices (or SD logging), NeoSWSerial will help with performance and reliability. And if you have a choice of pins in the future, you might want to consider pins 8 & 9 for the GPS. That would let you use AltSoftSerial, which is even better.
* It doesn't use the String class, which was only used for day and month names. Again, not crucial because the names are constants, but it accounts for the 1600 byte savings in the program space (and a little RAM). And it's probably best if the OP, a beginner, doesn't start out using them. Those names are still in RAM, BTW.
* It uses the F macro for double-quoted strings. This saved more than 100 bytes of RAM in the prints, both to Serial and the lcd. It works with the Streaming operators, too.
* It uses the classic UNIX technique for Date/Time calculations. Leap years, local time zones, 2- and 4-digit years, and DST are fully accommodated. Calendar math is performed in seconds, then converted to a time struct with hours, minutes, etc. See Time.h and Time.cpp
* The DST switch is checked all the time; you don't have to reset for it to take effect.
...and a few other coding tricks sprinkled in that you might like... ![]()
Cheers,
/dev
burnetteGPS.zip (34.4 KB)