Exercise 1:
Photos & Video:
Schematic:
Code:
For the first exercise, we are asked to create a sort of a painting brush that shows its trail on the screen. To realize this, we need to transfer two values from Arduino to processing because the ellipse should be set small and the fill of the background doesn’t need to be 0. Also, the x and y of the ellipse should reflect the change of the two potentiometers, so that the ellipse can serve as a brush and we can control which direction it goes by turning the potentiometers.
Exercise 2:
Photos & Video:
Schematic:
Code:
For the second exercise, we need to change the sound of the buzzer by changing its frequency and duration. Also, the frequency and duration should reflect the position of mouseX and mouseY. To realize this, we need to transfer two values from processing to Arduino, so as to change the tone of the buzzer according to the mouse position.