Need Help for GPS Time Output in P10 Display (Dot Matrix Display)

-dev:

// Inserting File Library

#include <SPI.h>
#include <DMD2.h>
#include <NMEAGPS.h>
#include <fonts/Arial_Black_16.h>

// PICK ONE OF THESE PORT ALTERNATIVES
//
// BEST: connect GPS to pins 0 & 1, since you're not using Serial.
//            Requires disconnecting pin 0 to upload new sketch over USB.
#define gpsPort Serial // just an alias for Serial

// 2nd BEST: connect GPS to pins 8 & 9 (on an UNO)
//#include <AltSoftSerial.h>
//AltSoftSerial gpsPort

// 3rd BEST:
//#include <NeoSWSerial.h>
//NeoSWSerial gpsPort(3, 4); // RX, TX

// WORST: SoftwareSerial NOT RECOMMENDED

// Defining Constants
#define Length 2
#define Width 1

// Declaration Variable
SoftDMD dmd(Length, Width);                  // Length x Width

NMEAGPS gps; // parser

void setup()
{
  dmd.setBrightness(255);
  dmd.selectFont(Arial_Black_16);
  dmd.begin();
  dmd.clearScreen();

gpsPort.begin(9600);
}

void loop()
{
  if (gps.available( gpsPort )) {
    gps_fix fix = gps.read();

if (fix.valid.time) {
      // UTC_ind_zone_time
      char dmdBuff[10];

sprintf_P( dmdBuff, PSTR("%02d:%02d:%02d"),
                fix.dateTime.hours, fix.dateTime.minutes, fix.dateTime.seconds );
      dmd.drawString(0,1,dmdBuff);
    }
  }
}



Your original program uses 12406 bytes of program space and 321 bytes of RAM.
The NeoGPS version uses 11584 bytes of program space and 270 bytes of RAM (Optimized. Standard config uses 14106/337).

The NeoGPS library also has methods for shifting the GPS date/time into your local timezone. See NMEAtimezone.ino.

If you want to try it, NeoGPS is available from the Arduino IDE Library Manager, under the menu **Sketch -> Include Library -> Manage Libraries**. Even if you don't use it, there is lots of information on the Installation and Troubleshooting pages. Be sure to read the section on [choosing a serial port](https://github.com/SlashDevin/NeoGPS/blob/master/extras/doc/Installing.md#2-choose-a-serial-port).

Cheers,
/dev

Hello. :slight_smile:
With NeoGPS Library I made a GPS Clock and It's working like a Charm Till Now. Thanks a lot for NeoGPS Library.

GPS Clock Output is Digital Clock. Now i want to make a Analog Clock.
Can i do that with NeoGPS Library?