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.

 

STEP 1


Open your Arduino IDE.

 

STEP 2

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

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

 

STEP 3

  1. Open your Processing IDE.
  2. Follow along with the following tutorial: https://processing.org/examples/pattern.html

     

    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?