This sketch is missing a short description
**RGB-LED and 2x Momentary Switches 01**
This is a very simple program to make Arduino to read signals (on/off) from two momentary switches (it reads signals about every 250 milliseconds). The program then instruct Arduino to change the colour of RGB-LED according to predefined values of Red, Green and Blue.
- If both switches are pressed, RGB-LED displays ‘Orange’.
- If switch 1 is pressed, it displays “Magenta”.
- If switch 2 is pressed, it displays “Green”.
**rgbPattern** is a custom function to change RGB value of RGB-LED. Try changing any of RGB values to see if you can find the colour you like.

Embed This Sketch
Use the following HTML code to embed the sketch code above in your blog or website.
<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:142466" frameborder="0"></iframe>
Embed The Serial Monitor
You can also embed the Serial Monitor section! Just use this HTML code.
<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>