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.
- Open up a new sketch.
- Upload code: “Arduino Sketch: ControllerDefault”.
- Open your Processing IDE.
- Follow along with the following tutorial: https://processing.org/examples/pattern.html
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?