Design Challenge: Make a device to control an RGB light. The features of the device include:
- A control to turn the light on and off. When it turns on, it should retain the relative red, green, and blue brightness levels from when it was last turned on.
- The ability to fade each color channel (red, green, and blue) from off to full brightness.
- Fade level should be maintained when you release the fade controller.
- Fade should be interruptible by other controllers, e.g. on/off or another fade controller.
- The ability to fade the overall brightness of the light.
Testing: This code explores turning on an LED with a switch. A potentiometer is then used to control the brightness of the LED. I worked with a white LED for this to ensure the code worked before connecting the RGB LED.
RGB LED Code:
Design and Fabrication