Getting ready for Halloween

Over a year ago I saw a post over on robotroom that talked about a LED light kit for a pumpkin. Having just acquired a Adruino Uno from Sparkfun I thought that this would be the perfect thing for Halloween however time constraints and a busy work schedule kept me from finishing the project.

After I thought about it though - who wants to throw their nice and shiny Ardruino into a pumpkin for an entire night of shenanigans? Turns out you can use your Ardruino to program a attiny85 chip to do the same thing and run it all with a 9V battery!

Parts

1 9V battery  
1 9V battery connector  
1 7805 Rectifier  
1 .1 uF Capacitor (probably not necessary)  
1 ATTiny85  
2 Yellow LEDs  
1 Red LED  
3 330 Ω resistor  
1 breadboard  

And the code

// LED Fire Effect

int ledPin1 = 0;  
int ledPin2 = 1;  
int ledPin3 = 4;

void setup() {  
  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
}

void loop() {  
  analogWrite(ledPin1, random(64)*4);
  analogWrite(ledPin2, random(64)*4);
  analogWrite(ledPin3, random(64)*4);
  delay(random(20));
}

Looks pretty good in action - can't wait to test it out.

Edit 10/22/2014: Adding a cirtcuit board that I am going to try and fabricate.