I am using a Seeed Studio TouchShield. I want to display an int on the screen. But the code only allows me to print chars and strings. I want to know if I can convert a int into a string or char. Basically what I'm asking do the following:
int=1, int=sting/char, string/char=1. Is this possible?
is there an easier way to do this?
If the number is between 0 and 9 then you can do
char c = number + '0';
If number is bigger then no there is not an easier solution than itoa, but there is another solution that is sprintf
char string[12];
sprintf( string, "%d", number );
print( string );
s3rr00:
is there an easier way to do this?
How much easier are you looking to get?