Hello,
I have a little problem with Serial.read(). I try to send a array from processing to my arduino board. The original array is byte[26][8]. All works fine if y just send array[5][8] => 40bytes. If i try to send array[6][8] =>48bytes, the Arduino does not manage the data's. This confuses mi because the Serialbuffer should have a size of 128 bytes. Any ideas what's going on in my Arduino? My baud rate is 115200, but there is no difference if I go to 9600.
Thanks for all replies.
I still look for a solution for this Problem.
Does nobody know something about?
hmm, I just tried to send 120 bytes in processing and receive them in the arduino
I use this code in processing to send:
for(i =0; i < 15; i++){
for( j=0; j < 8; j++){
myPort.write(data*[j]); *
- }*
- }[/font]*
and this arduino code to test receive
byte data[25][8];
void setup(){ - Serial.begin(9600);*
}
void loop()
*{ * - static int avail;*
- int i = Serial.available();*
- if( i != avail) {*
- avail = i;*
- lcd.setCursor(0,0);*
- lcd.print(i,DEC); *
- delay(1000);*
- } *
- if(i > 100)*
- for( int i=0; i < 101; i++){*
- int c = Serial.read();*
- if( i == 100)*
- lcd.print("c=");*
- lcd.print(c,DEC);*
- }*
}
tested ok for me (using Arduino 0012)
check: #define RX_BUFFER_SIZE 128 in wiring_serial.c