bigone5500
- Apr 9, 2014
- 712
- Joined
- Apr 9, 2014
- Messages
- 712
Wanted to give these guys some personality. Put some 3mm green LEDs in the eyes. Loaded a modified flicker sketch and ... IT'S ALIVE! IT'S ALIVE!
http://blog.jaredelliott.com/halloween-decor-with-arduino/ <<<---video
Code:
/*
Feel free to do whatever you want with this sketch.
*/
int ledPin0 = 2; // Define LED pins
int ledPin1 = 3;
void setup()
{
pinMode(ledPin0, OUTPUT); // Define LED pins as Outputs
pinMode(ledPin1, OUTPUT);
}
// Both LED outputs will flicker at the same time at a randomly chosen rate.
void loop()
{
digitalWrite(ledPin0, HIGH); // Turn on LEDs
digitalWrite(ledPin1, HIGH);
delay(random(100)); // Wait a random amount of time
digitalWrite(ledPin0, LOW); // Turn off LEDs
digitalWrite(ledPin1, LOW);
delay(random(100)); // Wait a random amount of time
}
http://blog.jaredelliott.com/halloween-decor-with-arduino/ <<<---video
Last edited: