Processing to Arduino multiple parameters

Hello,

I need to send a couple of parameters from Processing to Arduino. I caneasily send one number, however, when it comes to a string, say “45_22_65” I suddenly start getting problems.

The problem is that I can’t see what is that Arduino receives (I can’t open the serial port monitor as it is used by Processing) and the line is not decided accurately on the Arduino side (Inlook for the “_” to cut the line into separate chunks).

I thought that ‘underscore’ might be a bad separator or it is transmitted in a different way. Is there anything else I have overlooked?

There should be no problem using an underscore as a separator.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example which uses the comma as a separator but you could easily change it to an underscore.

It is a good idea to include in your Processing program the ability to display message received from the Arduino - a type of pseudo serial monitor.

...R

The problem is that I can't see what is that Arduino receives

The problem may be that you don't know how to see what the Arduino receives. It is NOT that you can't do it.

Serial.read() on the Arduino reads what Processing sent. Serial.print() sends data to Processing.

All you need to do is read the serial data that Processing receives, and print it.