void setup()
{
Serial.begin(115200);
while(!Serial && millis() < 5000) ; // wait for terminal to start or 5s ...
char tempText[10] {0};
int tempInt = 0;
int maxInts = 100;
Serial.println("Int to ascii using itoa");
Serial.println("Dec\tHex\tOct");
for (int n = 0 ; n < maxInts ; n++ )
{
itoa(n, tempText, 10); // decimal
strcat(tempText, "\t"); // just to show other std library C functions also work without includes
Serial.print(tempText);
itoa(n, tempText, 16); // Hex
strcat(tempText, "\t");
Serial.print(tempText);
itoa(n, tempText, 8); // Octal
strcat(tempText, "\n");
Serial.print(tempText);
}
}
void loop()
{
}