This week’s labs consisted of controlling a servo motor’s position with an analog sensor, as well creating tones with a mini-speaker and analog sensors.
The servo motor can be controlled to do simple motions. Here I am pinching a force sensor which instructs the Arduino to rotate the arm on the motor. The harder I pinch the force sensor, the farther the servo motor rotates the arm within a 180 degree limit. Here’s the lab instructions.
Next, for the tone output lab, we had to do the following:
create tone control via photo sensors
Program the Arduino to play a melody
Create a musical instrument. This was accomplished by using three force sensors which are mapped to specific notes.