Part 1: Servo Motor Control with an Arduino
This circuit moves the servo motor by twisting the potentiometer. I set it up like the schematic I drew, but on a breadboard and coded the circuit to adjust the motor. I used the map function to map the inputs of the potentiometer to the the angle of the motor (0-180) and then an if loop like the video described get even intervals.
Part 2: Tone Output Using An Arduino
I started by soldering on wires to the speaker, so I could use them on my breadboard
This circuit was a little harder, I set it up like the schematic but then the coding was a little tough. I followed the tutorial video to get the main code down, but then had to use tone() to get audio out of the speaker. I added in a delay of 1000ms so you can easily see the changes in frequency. I printed the frequency so I could see what range to make the map function. he write up said 100-1000, but I was getting 100-800.
Part 3: Creative Enclosure
I built a simple “water pressure gauge” that displays the waster PSI and you can adjust it to whatever you want. Not sure if you could do that in real life, but I thought it fit. I used an old Starbucks “For Here” mug box, cut it in half. Then I punched holes for the servo motor and the potentiometer. I put the other half over it so all sides would be covered. Some lines of the boxes show and there are some holes, If I pursued this more I would make the box fit better and make a better front plate, but I think it does the trick 🙂