LED

LED 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

// Turns on the LED awesome.LED.turnOn();

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

// Turns the LED green awesome.LED.turnOn(GREEN);

awesome.LED.turnOff()

The turnOff() function turns the LED off. This turns off each of the three elements inside the color LED.

Example

awesome.LED.turnOff();

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 ints 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

// Turns the LED purple (full red, no green, full blue) awesome.LED.turnOn(255,0,255);

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.

Example

// turn the LED on, to purple // the red and blue elements will be on afterwards awesome.LED.turnOn(PURPLE); // turn the red element off // only the blue element will be on afterwards awesome.LED.turnOff(RED);
x

Goodbye and thanks for all the fish,

Thanks for helping us Kickstart Awesome Shield and learning with us. Sadly, turning Awesome Shield into a sustainable business didn’t work out and so we’re in the process of officially shutting down the company.

Read our full letter.

If you have an Awesome Shield you can keep using it and the learning platform.


Close Message