In the first section of this lab, Cal and I wired up our breadboard and Arduino to begin working on the pulse-width modulation. This portion was used to control the speed of a motor, as well as the duty-cycle of the motor. The image below shows our final wiring of this motor. The potentiometer was used to determine the speed of the motor. Our motor would run for 50 msec and then stop for the same amount of time.
Final assembly of the PWM motor. |
The final section of this lab dealt with a piezo element. In this part of the lab, Cal and I learned how the Arduino could control the notes of sound. A piezo elemnt makes a clicking sound each time it has current running through it. If the pulse is at a certain frequency, a note is played. In essence, different frequencies mean different notes. Cal and I wired up our piezo element and copied the sample code from the lab. Upon running this code, our piezo element played "Twinkle, Twinkle Little Star" as shown in the video below.
No comments:
Post a Comment