Objective: To control an RGB LED using three potentiometers.
Materials: Arduino, USB cable, 1 RGB LED, 3 5V potentiometers, hookup wire, breadboard.
Tools: Wire strippers
Procedure:
- We first hooked up the RGB LED and ran a simple program we found on an Adafruit tutorial to cycled through the colors.
- We hooked up one potentiometer, and merged some some from last week’s potentiometer lab with the Adafruit tutorial code. It didn’t work initially.
- We tested a second potentiometer, which also didn’t work, which made sense after we saw/smelled smoke coming out of it.
- We tested a third potentiometer. Success! We were able to successfully control the intensity of one color on the RGB LED.
- With the wiring and coding confirmed good, I again tested the first potentiometer. Still bad. We were 1 for 3 in the potentiometer department.
- After testing two more potentiometers, we added code to support three simultaneous potentiometers, and were successfully able to control all three colors.
Results: Success at controlling the three colors manually with potentiometers.