/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
digitalWrite(2, LOW); // set the LED on
delay(200);
digitalWrite(3, LOW); // set the LED o
delay(200);
digitalWrite(4, LOW); // set the LED on n
delay(1000);
}
void loop() {
digitalWrite(2, LOW); // set the LED on
delay(1000); // wait for a second
digitalWrite(2, HIGH); // set the LED off
delay(1000); // wait for a second
digitalWrite(3, LOW); // set the LED on
delay(1000); // wait for a second
digitalWrite(3, HIGH); // set the LED off
delay(1000); // wait for a second
digitalWrite(4, LOW); // set the LED on
delay(1000); // wait for a second
digitalWrite(4, HIGH); // set the LED off
delay(1000); // wait for a second
}
i quickly modified the blink sketch..
this "works" first the red then the blue then the green, etc etc..
but, when the pin is "High" what's happening, because the common anode (+ 5v) is connected to the shared RGB pin, when the negative comes on
(eg, from HIGH to LOW), the circuit conducts and the diode turns on... but when both the Anode +5v and Cathode (0v becomes) 5v, should i be worried
it's not a short is it? anything i need to worry about?..
each cathode pin is connected with a 300ohm series resistor... (5v rail from the Arduino)