To begin, make sure Processing is closed, and then open the attached Arduino sketch. Essentially, this Arduino sketch reads the incoming values on the analog ports and then uses Serial Communication
functions to output the values. The values are separated by comma characters (denoted by quotation marks) which will be used to parse
, or separate the values. Processing will do this work.
While the sketch is excessively commented, take note of the argument to the Serial.begin()
function: this is the baud rate - in other words, the number of "signaling events per second." This can be modified according to your project specifications, but make sure that the rate is the same in the simultaneous Processing sketch (in my examples, the default is 9600).
If you are not familiar with the second argument of the Serial.print()
function, note that this is the base (or format) of the first argument - in this case, DEC stands for "decimal" or a base 10.