In order to sketch with processing, you need to learn how to register the “mouse” movement with code. In this case, the joystick moves in place of the mouse by using the same sketch as you would with a mouse. When coding different electrical components, you can swap out the physical forms using the same code.



Open your Arduino IDE.



Goal: map the controls to work with the Processing sketch.

  1. Open up a new sketch.
  2. Upload code: “Arduino Sketch: ControllerDefault”.



  1. Open your Processing IDE.
  2. Follow along with the following tutorial:


    STEP 4

    The line weight changes when you draw. Find the line of code of the stroke weight and experiment by changing the values.

    How does this line of code affect the drawing?