Is there an easy way to format numbers?
I map the value of a potentiometer to 0 - 24 and if the value is < 10 it should do a leading 0.
So that it would print
00
01
02
03
…
09
10
11
and so on.
Of course I could do a simple if the value is < 10 but I thought maybe there is a built in function that does this.
I did something like this for my real time clock to display a 01,02,02…
It has a lot of other junk in there but all it really does is push the number to the right and jam a zero in front if less than 0.
char second[2];
int tmpsecond = bcdToDec(Wire.receive());