Adding controls
My color-cycling program is fun and might be useful as a demo mode when the invention is on display. Onna’s invention calls for two knobs that control the color and the brightness, so my next step is to modify the Arduino program to make sure a human can control the colors in that way. I am going to use two knobs like Onna shows on her picture – the knobs are called potentiometers, and basically, when you turn them, they let more or less current through them. The Arduino can (indirectly) detect how much current is going through. I am going to use this principle to make the Arduino control the colors and brightness.
With a little bit of internet sleuthing, I find a neat color chart that shows the red, green and blue values of the twelve primary, secondary and tertiary colors. This is very handy! I modify my program so that it splits the “knob” into 12 areas. Once the Arduino detects which area the knob is in, it selects one of the 12 primary, secondary and tertiary colors and creates it by lighting up the correct combination of red, green or blue.