Arduino and Processing

deepaks's picture

 

  1. Program your arduino board using the Arduino IDE.
    1. Specify what pins you will be reading or writing from (A0, A1 or some input pin)
    2. 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.                                                                                                                                                          
  2. 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
    1. 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.
  1. 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