Light Controller

Design Challenge: Make a device to control an RGB light. The features of the device include:

  1. 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.
  2. The ability to fade each color channel (red, green, and blue) from off to full brightness.
  3. Fade level should be maintained when you release the fade controller.
  4. Fade should be interruptible by other controllers, e.g. on/off or another fade controller.
  5. The ability to fade the overall brightness of the light.

Code

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:

 

Schematics

Design and Fabrication 

References
https://itp.nyu.edu/physcomp/labs/labs-arduino-digital-and-analog/analog-in-with-an-arduino/
http://cdn.sparkfun.com/datasheets/Components/LED/YSL-R596AR3G4B5C-C10.pdf
https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds/arduino-sketch

Leave a Reply

Your email address will not be published.