Firstly, we need to flash the firmware onto the Arduino. This will allow the button presses and joystick movement to be sent to processing for playing sound via the Serial port.

  1. Open up an Arduino sketch and then copy the following code into the sketch.
  2. Compile the code and upload.
  3. Open up the Serial Monitor to make sure commands are getting sent. Move the joystick and press buttons to see the command changes.




Use the code below to interpret the data received from the Arduino and transform it into musical sounds.



Run the code.


The code above opens a processing graphical interface that plots the frequency and amplitude of the sound played.

Modify the code so that the size of the circle changes with the sound amplitude.

Modify the code so that the color of the circle changes with the frequency.