We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello all,
I am new to Processing. Currently I am working with a simple ultrasonic distance sensors and with Arduino Mega. The question is:
How can I receive mutiple sensor information at every instance of time in processing from Arduino side it transmits via serial port. I worked with an example of single sensor and it works fine. But how about multiple sensors via serial communication.
Kindly let me know. Thanks in advance.
Answers
The basic idea I use is to print from the Arduino a line of tab-separated values from the sensors:
and here is the Processing code to read those values:
The line you'll need to change will put the values into a global array where the main body of your program can read them. In my case it's the sensors[] array of Sensor objects I created.
HTH...
Thank you very much for your quick response... Now I can transfer multiple sensor information from my Arduino to Processing and visualize them.... :)>-