Analog LED with potentiometer

For assignment 4, I used a potentiometer to control the strength of the green LED while using a digital switch to increase the strength of the red LED.

Potentiometers, or pots, provide variable resistance based on the rotation of the dial. Potentiometers usually have three spots to connect wires. From left to right, the first goes to power, second goes to analog pin, the last goes to ground. The amount of voltage to the analog pin depends on the rotation of the dial, from 0 to 5V. http://en.wikipedia.org/wiki/Potentiometer

IMG_6859

Arduino Sketch: mti_analog_led
Code also has segment for blinking color mixer

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

%d bloggers like this: