Arduino Display Clock

I try to create an alarm clock, but I'm having a problem with the counting: Is it possible to create a scatch that counts 01; 02; 03; 04 instead of 1, 2, 3, 4? :) Thank you:)

Julius97: I try to create an alarm clock, but I'm having a problem with the counting: Is it possible to create a scatch that counts 01; 02; 03; 04 instead of 1, 2, 3, 4? :) Thank you:)

What you want is called "leading zeros".

Please show us your sketch without the leading zeros, and I will try to show you how to get the leading zeros.

Here is one way:

int clockValue = 0;
char clockValueStr[5];

clockValue++;
sprintf(clockValueStr,"%02d",clockValue);
tft.setCursor(100,100);
tft.setTextColor(WHITE, BLUE);
tft.setTextSize(4);
tft.print(clockValueStr);

@svan:

1) Please use code tags. like this

2) We don't know what (if any) kind of display the OP is using.