Created
December 8, 2016 15:30
-
-
Save skorotkiewicz/5e946b2389f4db09f328ab3293d133de to your computer and use it in GitHub Desktop.
RGB led (blink)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Red = 10; | |
int Green = 11; | |
int Blue = 12; | |
int Canode = 13; | |
void setup() { | |
digitalWrite(13, HIGH); | |
pinMode(Red, OUTPUT); | |
pinMode(Green, OUTPUT); | |
pinMode(Blue, OUTPUT); | |
pinMode(Canode, OUTPUT); | |
} | |
void loop() { | |
//RED | |
digitalWrite(Blue, HIGH); | |
digitalWrite(Red, LOW); | |
digitalWrite(Green, HIGH); | |
delay(1000); | |
//Yellow | |
digitalWrite(Blue, HIGH); | |
digitalWrite(Red, LOW); | |
digitalWrite(Green, LOW); | |
delay(1000); | |
//GREEN | |
digitalWrite(Blue, HIGH); | |
digitalWrite(Red, HIGH); | |
digitalWrite(Green, LOW); | |
delay(1000); | |
//funny colour | |
digitalWrite(Blue, LOW); | |
digitalWrite(Red, HIGH); | |
digitalWrite(Green, LOW); | |
delay(1000); | |
//BLUE | |
digitalWrite(Blue, LOW); | |
digitalWrite(Red, HIGH); | |
digitalWrite(Green, HIGH); | |
delay(1000); | |
//PURPLE | |
digitalWrite(Blue, LOW); | |
digitalWrite(Red, LOW); | |
digitalWrite(Green, HIGH); | |
delay(1000); | |
//WHITE | |
digitalWrite(Blue, LOW); | |
digitalWrite(Red, LOW); | |
digitalWrite(Green, LOW); | |
delay(1000); | |
// | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment