This project was completely component driven. [Christopher] and [Robert] wanted to try out buttons with an RGB backlight option. They found the one shown above, which looks fantastic. It should since it costs over twenty bucks in single units. What they came up with is a one pixel video game that works like a color matching version of Simon Says. The button will show you the target color for just a moment. The player then holds the button as it fades through colors. Releasing it at the right instant will produce a green flash, a wrong shade results in a red flash.
They went with an Arduino Mega for the project as that was within easy reach. A hunk of protoboard is used as a shield, it includes the button itself, connected through some current limiting resistors to the pins that drive the LED. There is also a tactile switch which actuates the AVR’s reset pin.
When trying to get the LED to fade through the full range of colors [Christopher] was hit with a common problem. Since our eyes don’t detect changes in low and high intensity light the same way, you can’t use linear changes in PWM and get a smooth result. He fixed this by using Gaussian curves to set the intensity levels.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)