Thanks HTH for your reply.
*2: I am sending it as an DEC not ASCII (that is why the Serial.peek() returns the correct number and not its ascii code as you can see in the output)
*3: Unfortunately I forgot to change it during paste and copy. I used to have an array size of PROTOCOL.. but later I just changed to 230. So it should be 230 instead of PRO..
*4 I know that I am printing beyond the stored serial.read values. this is just for me to see whether at least the correct values are (magically) stored in the array, what they aren't of course. Actually you can leave that out as well, as the output above already shows the corrupt buffer values
*1 That is what I am talking about: There is no value anymore in the buffer, although I sent 100 values.. Why the jumps??..
As you are maybe not familiar with the syntax of the Serial lib:
a. Serial.read() returns the first value from the buffer and deletes it.
b. Serial.peek() just returns the first value.
So the output shows:
fixed string "reading"; the array element "a"; the actual value in the buffer (using Serial.peek)
Anyone any idea?..
Thanks!