Description: An LED Diode (Red & Blue) with a Common Cathode alternates turning the blue and red light of the LED ON/OFF with a 2 second delay between each change.
Supplies:
1 – Breadboard 400 Points
1 – Seeeduino Xiao
1 – LED (Red & Blue with Common Cathode) >> Link <<
1 – 220 Ohm Resistor
Arduino Code:
#define blue 3 #define red 4 void setup() { pinMode(blue, OUTPUT); pinMode(red, OUTPUT); } void loop() { digitalWrite(blue, LOW); digitalWrite(red, HIGH); delay(2000); digitalWrite(blue, LOW); digitalWrite(red, LOW); delay(2000); digitalWrite(blue, HIGH); digitalWrite(red, LOW); delay(2000); digitalWrite(blue, LOW); digitalWrite(red, LOW); delay(2000); }