void setup() {
// put your setup code here, to run once:
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void red(){
digitalWrite(1,LOW);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
}
void green(){
digitalWrite(1, HIGH);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
}
void blue(){
digitalWrite(1, HIGH);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
void magenta(){
digitalWrite(1, LOW);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
void yellow(){
digitalWrite(1, LOW);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
}
void cyan(){
digitalWrite(1, HIGH);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}
void white(){
digitalWrite(1, LOW);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}
int x=100;
void loop() {
// put your main code here, to run repeatedly:
red();
delay(x);
green();
delay(x);
blue();
delay(x);
magenta();
delay(x);
yellow();
delay(x);
cyan();
delay(x);
white();
delay(x);
}