Concat() a String of bytes?


It is possible create a String that concat bytes indeed ascii characters ?
For example,

String x = "";
byte b = 12;

for(int i=0;i<x.length();i++)
So, the output is 49 50 :frowning:
the method concat() is perfect to my propose, any suggestions ? THANKS.

No, you don't want to use the String class for that. If you want to convert a number into ascii digits use itoa.

char x[4];
byte b = 12;

itoa(b, x, DEC);

//printing chars will treat them as ascii and print '1' and '2'.  
// to get the requested output we will cast to int so they are 
// printed as numbers 49 and 50.  

for(int i=0; i < strlen(x); i++){
   Serial.print(' ');  // print a space to separate values.