Skip to content

Instantly share code, notes, and snippets.

@chadpaulson
chadpaulson / RGBL_Digital.pde
Created February 15, 2012 08:30
Arduino-controlled common anode RGB LED
//--- bof RGBL - RGB Digital Preamble
//RGBL_Digital.pde - common anode
//RGB LED pins
int ledDigitalOne[] = {14, 15, 16}; //the three digital pins of the first digital LED 14 = redPin, 15 = greenPin, 16 = bluePin
int ledDigitalTwo[] = {9, 10, 11}; //the three digital pins of the first digital LED 14 = redPin, 15 = greenPin, 16 = bluePin
int ledDigitalThree[] = {3, 5, 6}; //the three digital pins of the first digital LED 14 = redPin, 15 = greenPin, 16 = bluePin
const boolean ON = LOW; //Define on as LOW (this is because we use a common Anode RGB LED (common pin is connected to +5 volts)
const boolean OFF = HIGH; //Define off as HIGH
//Predefined Colors