RGB LED Experiments

After completing the RGB LED project, test yourself by trying these experiments.

1 Modify the code to show the three primary colors, red, green and blue, in sequence. RGB LED program
2 What color do you see when you set both red and green to 255?

What color do you see when you set both red and green to 125?

What value do you need to have to get the white color?

What value do you need to have to get the black color?
3 Write the code to fade in the blue color, i.e. start from black and then slowly bring the blue in until full bright. Hint: use the for loop. RGB LED program
4 Write the code to fade in the green color, and then fade out. Hint: use two for loops, one to fade in and the second one to fade out. RGB LED program
5 Experiment and create your own color show.