User manual
IDUINO for Maker’s life
www.openplatform.cc
In this example, we blink an LED and using an RGB LED we can generate any color we
want.
Here is the physical connection:
Code:
********Code begin********
int ledDigitalOne[] = {10, 11, 9}; //the three digital pins of the digital
LED
//10 = redPin, 11 = greenPin, 9 =
bluePin
const boolean ON = HIGH; //Define on as LOW (this is because we use
a common
//Anode RGB LED (common pin is connected to
+5 volts)
const boolean OFF = LOW; //Define off as HIGH
//Predefined Colors
const boolean RED[] = {ON, OFF, OFF};
const boolean GREEN[] = {OFF, ON, OFF};
const boolean BLUE[] = {OFF, OFF, ON};
const boolean YELLOW[] = {ON, ON, OFF};
const boolean CYAN[] = {OFF, ON, ON};
const boolean MAGENTA[] = {ON, OFF, ON};
const boolean WHITE[] = {ON, ON, ON};
const boolean BLACK[] = {OFF, OFF, OFF};
//An Array that stores the predefined colors (allows us to later randomly
display a color)
const boolean* COLORS[] = {RED, GREEN, BLUE, YELLOW, CYAN, MAGENTA, WHITE,