Monday, November 30, 2015

Mixing Colors with RGB


For this project assignment we had to keep the same wiring as the last one, however we had to change the code. We then had to modify the following code to show 5 more colors. When we mixed the colors, turning on 2 or 3 lights at the same time we got other colors. We got more creative and decided to mix 5 different colors and show them each for 5 seconds, then show the next one.

In example if you turned off all the lights and then put



analogWrite(greenpin,255);
analogWrite(bluepin,255);


You would get Yellow. A mix of green and Blue. Let the light reflect off your hand and you should see the yellow light.


If you go to this site Colors  you will see how to mix colors
                                                                                                                   
                                                                                                                     
                                                                                                               

No comments:

Post a Comment