Hi Guys
I was trying to make a clock using a graphical LCD screen because I wanted to put animations on there. The screen I'm using is a DOGL128 and I am using a DS1307 RTC to keep the time. The library which comes with the screen has a string function where you can output text to the string, however it requires a const char in the parameter for the text and I wanted to be able to read the time from the chip and output it but I don't know how to convert integers into a const char.
Here is the link to the library I'm using --> http://www.lcd-module.com/support/application-note/arduino-meets-ea-dog.html It is the second link on the page
Description of the itoa function (and many others you should know) is here. If that's not what you're trying to do, I just wasted my time guessing without your code.
The key is %02d. It formats an integer into a string with up to 2 digit numbers so if you have 2:05pm, then the 5 will be output into 05, what we expect.
PaulS - If you read what I said in my original post, I have to cast it into a const char* but I only know how to convert it into a char. I have to cast it into a const char* because that is the type which is required by the function DOG.string() in the last parameter