-
Program your arduino board using the Arduino IDE.
-
Specify what pins you will be reading or writing from (A0, A1 or some input pin)
-
Write the code which sends data from arduino to the processing which will be something like. What this code does is that it first reads from the Arduino and then it prints it out on the serial connection with a line break after every print.
-
Run the Processing code on your PC/Mac which reads from the serial port (will be COM<id no> for windows and /dev/tty<id> for Mac/Linux) to which your Arduino is connected using the Processing IDE
-
When you run this code, it reads whatever data arrives on the serial port and then uses that data to do something like increase the radius of the circle or change the color and so on.
-
By now, whenever you change the potentiometer value, then the following events occur as in the attached image
Some more explanation in the below video
http://www.youtube.com/watch?v=g0pSfyXOXj8