Reverse engineering characters to ascii
so i've got code (see below) turns characters ascii, works great want make turns ascii characters i'm completly lost. if tell me how modify code or me (i wont mind ) great.
code: [select]
void setup()
{
serial.begin(9600);
char string[] = "abd";
char buffer[4 * sizeof(string)];
char* buffptr = buffer;
(byte = 0; < sizeof(string) - 1; i++) {
itoa((int)string[i], buffptr, 10);
buffptr += strlen(buffptr);
*buffptr = ' ';
buffptr++;
}
buffptr--;
*buffptr = '\0';
serial.println(buffer);
}
void loop()
{
}
Arduino Forum > Using Arduino > Programming Questions > Reverse engineering characters to ascii
arduino
Comments
Post a Comment