Go Down

Topic: Receiving junk info from serial monitor (Read 2719 times) previous topic - next topic


I'm just starting out with arduino. Right now im trying to get an arduino Mega clone to print out the values contained in an 8x8 bidimentional array. everything seems to be working out just fine, but instead of printing the information, the only thing I can see i a series of junk info formatted as I have specified in my code (8 characters, newline, 8 characters, and so on) what could I be getting wrong?

I'm using an arduino mega clone with arduino IDE0022 under windows xp.

Code: [Select]
int valor; //para mostrar el punto de la matriz
int x; //para recorrer filas
int y; //para recorrer columnas

//nuestro matriz
byte tablilla[8][8]={
void setup() {

//comenzamos con el puerto serial

void loop() {
 for(y=0;y<8;y++){  //columnas
 Serial.println(); //una columna nueva
   for(x=0;x<8;x++){  //filas
     valor=tablilla[x][y]; //guardamos todo en una variable
     Serial.write(tablilla[x][y]);  //mostramos ese valor

//limpiamos la pantalla
Serial.print(27,BYTE);   //tecla "esc"
Serial.print("[2J");   //clrs



thanks, actually i switched to using

Code: [Select]

My error was in thinking that the "Serial.write()" was used to send just one character, it does, but it sends it in binary form. I'm much better off using the "Serial.print()"

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131