LED
LEDs are efficient lights. LED stands for "Light Emitting Diode". The Awesome Shield has a full color LED. It's really three LEDs stuck together. A red one, a green one, and a blue one. You can blend these three colors together to make all the colors of the rainbow. Nifty!
Main Functions
awesome.LED.turnOn()
Turns the LED on, and sets the color to white. This means it turns the red, green and blue elements to full brightness.
Example
awesome.LED.turnOn(COLOR)
Turns the LED on with a predefined color.
Inputs
You can give it a single input, which is a color name written in capitals. You can use these color names: WHITE
, RED
, GREEN
, BLUE
, YELLOW
, PURPLE
, and CYAN
.
Example
awesome.LED.turnOff()
The turnOff()
function turns the LED off. This turns off each of the three elements inside the color LED.
Example
Advanced Functions
awesome.LED.turnOn(red, green, blue)
Let's you turn on the LED with exact the color you want.
Inputs
It takes three inputs, which are numbers. These number inputs should be int
s between 0 and 255. That means they should be whole numbers between 0-255. They will set the brightness of the red, green and blue elements inside the color LED. A higher number means a brighter color. The order of the color strengths is: red, green, then blue. For example, awesome.colorLED.turnOn(100, 0 , 255)
sets the brightness of the red light to 100, the green to 0 and the blue to 255.
Example
awesome.LED.turnOff(COLOR)
When the turnOff()
function is given an input, it turns off one element in the LED. It can be given the input: RED
, GREEN
, or BLUE
.