Lab 5

In this lab we explored analog input and output using variable resistors. I also created a circuit that varies the brightness of an LED through photosensor values and SoftPot Membrane Potentiometer values.

For the first part of the lab I created a circuit that would change the brightness of a LED depending on the value of a potentiometer. The code required to make this system work involved reading the analog value of the potentiometer and converting that value so it could be outputed by the LED.

Lab 5 Potentiometer from kshioshita on Vimeo.

For the second part of the lab I used a touchsensor that varied the brightness of the LED depending on where it was touched and and photosensor that varied the brightness depending on the amount of light it was exposed to. The touch sensor value affected the red LED, while the photosensor varied the yellow LED. Again I used analogRead to get information from the sensors and map() to convert the readings into values that could be outputed by an LED.

Lab 5 Touch Sensor from kshioshita on Vimeo.

Lab 5 Photosensor from kshioshita on Vimeo.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s