Lab 6

For this lab we created two different circuits that utilized a pseudo-analog output voltage with Pulse-width modulation and frequency modulation.

Part 1: Servo Motor Control with an Arduino

For the first part of the lab I used a potentiometer to control the angle of a servo motor. The code required us to include the servo library, then use analogRead() to get the value from the potentiometer and map it, so that the servo motor could move.

Lab 6 Servo Motor from kshioshita on Vimeo.

Part 2: Tone Output using an Arduino

For this part of the lab we used photocells to vary to tone output of a speaker. To code the Arduino, we used an analog input from the photocells and mapped the values to play a tone at varied frequencies.

Lab 6 Speaker from kshioshita on Vimeo.

Part 3: Creative Enclosure

For my creative enclosure I expanded on the first part of the lab by incorporating a photocell that controls the angle of the servo motor arm. I created a day and night simulator where the moon or sun comes up, depending on how much light the photocell is exposed to. When there is a lot of light the sun comes up but when there is little light, the servo rotates so that the moon is showing.

Lab 6 Enclosure from kshioshita on Vimeo.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s