Hi
I’m using an LCD widget to display DD:HH:MM for an uptime counter, but when the respective variables are zero, nothing displays in the display. I want to get 00:00:01, but am getting : : 1
How can I force a zero character in front of the digit being displayed?
Hi Pete, Thanks for that advice. I’ve not used sprintf function before so will look into it. I did manage to resolve the problem by creating a char array and populating it with the char of the number generated by the timer then pointing the lcd.print to the array. Works well, resolving the leading 0 for single digit numbers and the alignment requirements in one.