SALES INQUIRIES: 1 (888) 767-9864

Arduino RGB Mixing GUI:: Student Project

Arduino in color

Jaco Coetsee put this project together to better understand how RGB values work together to make color. The RGB color scheme is used in HTML coding create the colors we see on websites, and it’s a great way to illustrate the properties of colors in general. He also got to program an Arduino to read and display user input, and generate neat text and visual outputs. Jaco’s project can also be used as a handy tool for someone who has to work with RGB values regularly as a dedicated color calculator.

How it works

The mixer enables you to select color values via a rotary encoder that increments and decrements the values between 0 and 255 with a simple twist. When you’re happy with the value displayed on the LCD screen, simply press the rotary encoder to select it and move to the next color component.  The RGB LED shows the current result (color) of the settings as you’re going along, so it basically lets you mix colors on the spot using the RGB scheme e.g. (R=128, G=128, B=128)= Grey, (R=0, G=0, B=0)=Black, (R=255 ,G=0 ,B=0)=Red and so on (see chart).

Red Value

Green Value

Blue Value

Output Color

0

0

0

Black

255

255

255

White

128

128

128

Grey

255

0

0

Red

0

0

255

Blue

255

255

0

Yellow

After all the values are input, the program checks values of each RGB component, gives the mixed color a name corresponding to a pre-defined list of colors, and displays it on the LCD screen. It does this by using nested switch/case statements, and it will approximate the RGB value to 27 different color names.

As mentioned, there is also the RGB LED module that displays the final mixed color as well as all the color changes in real time. It is controlled using the analogWrite Function and using the same values as input by the user.

Jaco’s project is another example of using Arduino projects to explore the world through tools and programming that are easy to learn and connect.

Part list:

  • Rotary Encoder
  • Sensor Shield
  • Arduino Uno
  • RGB LED
  • LCD 16×2 display with I2C

Arduino Code: