Presentation is loading. Please wait.

Presentation is loading. Please wait.

The RGB LED.

Similar presentations


Presentation on theme: "The RGB LED."— Presentation transcript:

1 The RGB LED

2 What is a RGB LED You know what’s even more fun than a blinking LED? A colored one. RGB, or red-green-blue, LEDs have three different color-emitting diodes that can be combined to create all sorts of colors. In this circuit, you’ll learn how to use an RGB LED to create unique color combinations. Depending on how bright each diode is, nearly any color is possible!

3 Parts Needed This LED is a little different then the ones we used before. First it has 4 legs instead of 2 and there is FLAT area on the side of the LED that is how you will know what legs of the LED go where.

4 Lets Build The Circuit More Instructions next Slide

5 Where To Place Things

6

7 The Code Type the code in below at the top of your Sketch (program) this will go above the “void setup ()” functions. We are assigning the variables red pin, green pin and blue pin to there pin numbers. Type the code in exactly as it is below, even the // and what comes after them.

8 The Code Type the code in below in the “void setup ()” area We are setting each of the pins red pin, green pin and blue pin to there pin numbers and now as an output. This means we will be sending voltage from each of these pins . Type the code in exactly as it is below, even the // and what comes after them.

9 The Code Type the code in below in the “void sloop ()” area. We are going to turn the different colors on one at a time. When you finish typing go to the next slide and continue where you left off.

10 The Code Continue with the writing of the code.

11 The Code That was a lot of code to write, lets make sure there were no mistakes. Click on the Check Mark button to see if you typed everything correctly if so click the Arrow button and down load the Sketch and watch and the RGB changes color. How is it doing this? How many colors did it change too? Answer these questions in your workbook. Look back through the power point and through the sketch to help answer this question.

12 Review You learned about the RGB LED and how to make it change color. Do a little research on the internet and look at the different projects that are done using the RGB LED’s and strips. You will be amazed at what you can do.


Download ppt "The RGB LED."

Similar presentations


Ads by Google