Four Color LEDS

From BCRCWiki

Revision as of 23:27, 8 November 2017 by Sbrewer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

const int RA = 0; const int GA = 1; const int BA = 2;

const int RB = 3; const int GB = 4; const int BB = 5;

const int RC = 7; const int GC = 8; const int BC = 9;

const int RD = 11; const int GD = 12; const int BD = 12;


void setup() {

pinMode(RA, OUTPUT); pinMode(GA, OUTPUT); pinMode(BA, OUTPUT);

pinMode(RB, OUTPUT); pinMode(GB, OUTPUT); pinMode(BB, OUTPUT);

pinMode(RC, OUTPUT); pinMode(GC, OUTPUT); pinMode(BC, OUTPUT);

pinMode(RD, OUTPUT); pinMode(GD, OUTPUT); pinMode(BD, OUTPUT); }


void loop() { digitalWrite(RA, HIGH); digitalWrite(GA, LOW); digitalWrite(BA, LOW);

digitalWrite(RB, LOW); digitalWrite(GB, HIGH); digitalWrite(BB, LOW);

digitalWrite(RC, LOW); digitalWrite(GC, LOW); digitalWrite(BC, HIGH);

digitalWrite(RD, HIGH); digitalWrite(GD, HIGH); digitalWrite(BD, HIGH); }



Personal tools