Color

Pick a Color… Any Color!

Gotta love Arduino!
Made a quick demo to show PWM intensity control of Red, Green, and Blue LEDs in a rotary encoder using the rotary encoder’s push button for channel selection and a 7 segment display to show the channel.

The rotary encoder in the pictures below contains three LEDS (Red, Green, & Blue).  They have a common cathode and so I tied their anodes each through a resistor to a separate PWM output of an Arduino Uno. This allowed me to adjust intensity of each independently with a value from 0-255. I then read the encoder output and push button state of the encoder (did I mention it has a push-button switch in it too? Yuup!) using a few more Arduino inputs. I used the push button to select which RGB channel the user was modifying and the encoder output to adjust the selected value. I then used a very inexpensive 7 segment display from Sparkfun with a built-in controller that accepts serial comms for control.

RGB Rotary encoder displaying full red color.
RGB Rotary encoder displaying full red color.
RGB Rotary encoder displaying full green value.
RGB Rotary encoder displaying full green value.
RGB Rotary encoder displaying full blue value.
RGB Rotary encoder displaying full blue value.

 

Using all built-in or easily available libraries from Arduino, I was able to have this entire demo functional in about an hour. After I had it functional, I easily spent hours just clicking the push button, selecting RGB channels and changing the mixture of Red, Green, & Blue. This was a simple demonstration meant to explore very minimal user interface options for input and control.

Total time spent making = 1 hour.
Total time spent mixing colors after the fact = too many!

RGB Rotary Encoder displaying PWM-mixed color as selected by user.
RGB Rotary Encoder displaying PWM-mixed color as selected by user.