Recitation 8: Serial Communication by Malika

Exercise 1: Make a Processing Etch A Sketch

The schematic for this sketch is simple. As is shown below, I connected the left side of the breadboard to the 5V and GROUND on the Arduino Uno with red and black wires, and connected the two bottom legs of each potentiometer to the power and ground respectively. Also, I connected the top leg of each potentiometer to A0 and A1 with white wires to send signals to the Arduino.

Exercise 2: Make a musical instrument with Arduino

The schematic for this sketch is even simpler than the previous one. I connected the positive side of the buzzer to pin 7 on the Arduino and the negative side to GROUND. I make it the way that when the spacebar is pressed, the buzzer beeps. And when the spacebar is released, the buzzer quiets down. The frequency of the tone depends on the mouseX and mouseY. The further the mouse is away from the point (0,0), the higher the frequency in which the buzzer beeps.

Leave a Reply