A char can hold one character. A char array can hold more than one character.

A two dimensional array would solve your problem neatly. The first value would range from 0 to 59, and would be defined by the output from seconds. The second value would be a fixed size (4, in your case).

would result in ptr = "7,3" when second() returned 57, which would need to be parsed (using strtok) and converted to integers (using atoi) to get the integer values that the LCD controller function is looking for.

void digitalClockDisplay(){ Serial.print(second()); // digital clock display of the time Serial.print(" "); Serial.print(*ptss); //Displays one number of the first Array Serial.print(","); Serial.print(*ptst); //Displays one number of the second Array Serial.println(); }

void setup() { Serial.begin(9600); setSyncProvider( requestSync); //set function to call when sync required Serial.println("Waiting for sync message"); /* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */ lc.shutdown(0,false); /* Set the brightness to a medium values */ lc.setIntensity(0,10); /* and clear the display */}

In loop, you declare local variables with the same names, and initialize them. That has no effect on the global variables.

At the end of the if block in which the local variables ptss and ptst are declared, they go out of scope.

The function digitalClockDisplay references the global variables, which have never been initialized.

Even if you remove the declaration statements in the if block in loop, so that ptss and ptst refer to the global variables, the initialization does not take place until after the call to digitalClockDisplay.

Also, sec1[0][0] is set to 0, which is not the same as '0'.

Finally, since the stated goal was to use the values that ptss and ptst point to as arguments to the lc function, which requires integers, it seems to me that you should declare sec1 and sec2 to be integer arrays.

Last, but not least, there is a pattern to the values in sec1 and sec2 that means that you don't need to store them in an array.