*Reading Arduino’s Serial.print(data) in MaxMsp
Example:
In Arduino, we can turn on the serial monitor to print out the values. However, how can we keep monitoring the values in MaxMsp? J Let’s try.
Arduino:
Set the value and use the function Serial.print();
Serial.print(” “); //This will create a space between each value.
Serial.printl(); //This start a new line for vales.

MaxMsp:
Using “metro” object to start printing the values.
Using “serial” object to read and receive data from serial port.
Using “itoa” object to translate the integer to ASCII characters?
Using “print” object to get the same monitor effect as Arduino

What’s the difference between Arduino’s Serial Monitor and Max?
1. In Arduino, the value ,168, is printed on one line. In Max, each character is printed on a line so 168 prints on three line.
2. In Max, Serial.print(” “); is printed as a empty line.
For example:
aread:
3. In Max, Serial.printl(); is printed as two empty lines.
For example:
aread:
aread:
Thoughts:
The above example helps me to know what the serial port is reading when I use MaxMsp to give my Arduino port some information.
Thanks Liubo