I've been searching for a couple days but i didn't find anything.
I think is no need to explain the code, it's quite simple.
When I use a Ruby script to send the data trought the Serial port everything is correct, so I suppose that the error is in the Processing code.
When I execute this, Arduino puts on the Serial Window, random 6,5, and New Lines.
When I execute this, Arduino puts on the Serial Window, random 6,5, and New Lines.
You have the Arduino on one end of the serial port. On the PC, there can be one thing on the other end. Is that the Processing application or the Serial Monitor? It can't be both.