Hi, I need some help with my Arduino.
I wanted to create a string with a length of 3 characters.
and wanted to print this string on the LCD display.
these 3 characters will be an integer that can range between 0 and 999.
int number = 123 // range between 0 and 999 string a = number; // the string must always be 3 characters long. lcd.print(a);
My problem is how do I define the string with only 3 characters of space? that is, even if the number only has 1 character I want the string to have 3. That is, when printing it would be ("clear","clear",3)