someone of you could link me to a page in which is explained clearly how to read multiple variables in processing from a Serial port to which is connected an Arduino.
I need both the Arduino sketch and the Processing sketch.
I searched on the internet but I found too different solutions, with json, with firmata, with readuntil() etc...
Could you please tell me what is the most reliable?
Processing will then receive something like "<12, 45, 78>". You can use bufferUntil() in Processing, to ensure that serialEvent() is only called when the carriage return/line feed is received. Then, the serial data will consist of the entire packet, which is then relatively easy to parse.