Processing: should I use Firmdata ?

Ok, solved.
I used the processing examples but they are no so good IMO. The problem is that the serial buffer is saturated.
The solution is to send / receive only when there is a change in the state. For instance, on the arduino side:

oer=analogRead(OER)>512?1:0;
oef=analogRead(OEF)>512?1:0;
odr=analogRead(ODR)>512?1:0;
odf=analogRead(ODF)>512?1:0;
b1=oer+oef2+odr4+odf*8;
if (b0!=b1) { // send only if state changed
Serial.print(b1,BYTE);
b0=b1;
}
...
delay(100);

The same for Proessing.

If someone needs help, just ask me and I post both codes :slight_smile: