here is some coding I have been working for the light display
void setup()
{
pinMode(3, OUTPUT); //red // sets digital pins as outputs
pinMode(4, OUTPUT); //white
pinMode(5, OUTPUT); // blue
pinMode(6, OUTPUT); //stars
pinMode(7, OUTPUT); //USMC
pinMode(8, OUTPUT); //House
pinMode(9, OUTPUT); //Yard
pinMode(10, OUTPUT); //Yard 2
}
void loop()
{ digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
delay (5000);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay(1000);
digitalWrite (7, HIGH);
delay (5000);
digitalWrite (7,LOW);
delay (1000);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
delay (500);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay(1000);
digitalWrite (7, HIGH);
delay (500);
}
I am still working on it and will update as I post.
void setup()
{
pinMode(3, OUTPUT); //red // sets digital pins as outputs
pinMode(4, OUTPUT); //white
pinMode(5, OUTPUT); // blue
pinMode(6, OUTPUT); //stars
pinMode(7, OUTPUT); //USMC
pinMode(8, OUTPUT); //House
pinMode(9, OUTPUT); //Yard
pinMode(10, OUTPUT); //Yard 2
}
void loop()
{ digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
delay (5000);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay(1000);
digitalWrite (7, HIGH);
delay (5000);
digitalWrite (7,LOW);
delay (1000);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
delay (500);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay(1000);
digitalWrite (7, HIGH);
delay (500);
}
I am still working on it and will update as I post.
No comments:
Post a Comment