Signed in as:
filler@godaddy.com
Signed in as:
filler@godaddy.com
/*
* Snow effect example on the Tree
*/
int ledPin1 = 5; // LED connected to digital pin 5
int ledPin2 = 6; // LED connected to digital pin 6
int ledPin3 = 7; // LED connected to digital pin 7
int ledPin4 = 8; // LED connected to digital pin 8
int ledPin5 = 9; // LED connected to digital pin 9
int ledPin6 = 10; // LED connected to digital pin 10
int ledPin7 = 11; // LED connected to digital pin 11
int ledPin8 = 12; // LED connected to digital pin 12
int ledPin9 = 13; // LED connected to digital pin 13
int delay1 = 300;
void setup() {
// Uncomment below to set pins to OUTPUT for ultra bright intensity on 5V boards
// Do not watch directly the LEDs in that case as the brightness is very intense
/* pinMode(ledPin1,OUTPUT);
pinMode(ledPin2,OUTPUT);
pinMode(ledPin3,OUTPUT);
pinMode(ledPin4,OUTPUT);
pinMode(ledPin5,OUTPUT);
pinMode(ledPin6,OUTPUT);
pinMode(ledPin7,OUTPUT);
pinMode(ledPin8,OUTPUT);
pinMode(ledPin9,OUTPUT);*/
}
void loop() {
// Turn LEDs ON from top to bottom with a delay between them
//*************************************
digitalWrite(ledPin4, HIGH);
delay(delay1);
digitalWrite(ledPin3, HIGH);
delay(delay1);
digitalWrite(ledPin7, HIGH);
delay(delay1);
digitalWrite(ledPin6, HIGH);
delay(delay1);
digitalWrite(ledPin2, HIGH);
delay(delay1);
digitalWrite(ledPin8, HIGH);
delay(delay1);
digitalWrite(ledPin5, HIGH);
delay(delay1);
digitalWrite(ledPin1, HIGH);
delay(delay1);
digitalWrite(ledPin9, HIGH);
delay(delay1);
//*************************************
// Turn LEDs OFF from top to bottom with a delay between them
//*************************************
digitalWrite(ledPin4, LOW);
delay(delay1);
digitalWrite(ledPin3, LOW);
delay(delay1);
digitalWrite(ledPin7, LOW);
delay(delay1);
digitalWrite(ledPin6, LOW);
delay(delay1);
digitalWrite(ledPin2, LOW);
delay(delay1);
digitalWrite(ledPin8, LOW);
delay(delay1);
digitalWrite(ledPin5, LOW);
delay(delay1);
digitalWrite(ledPin1, LOW);
delay(delay1);
digitalWrite(ledPin9, LOW);
delay(delay1);
}