Go Down

Topic: serial output of a char array (Read 909 times) previous topic - next topic


hi I am trying to output the values in a char array via serial but all  I get are numbers instead of the letters stored in the array.

Code: [Select]
for(int i=0; i < cantletras; i++){

am i missing something?

thank you


What numbers do you get? Do you expect certain letters?

Seeing numbers is not actually that strange. The arduino sees letters and all other datatypes as 1s and 0s, as you know :)

It would've been helpful to see a bit more of your code.


Are you sure it's a char array? If its an int array holding chars then the code you posted will print the ascii value (i.e. numbers).

As AlphaBeta says, it would be easier to help you if you posted a bit more code.


Code: [Select]
for(int i=0; i < cantletras; i++){
 Serial.print(array[i], BYTE);}

Go Up