This classic project from MAKE alum Marc de Vinck is a great last minute project that will scare the candy out of any unsuspecting trick-or-treater. It’s a relatively simple build that can probably be pieced together with items you have laying in your junk pile or be picked up with a quick trip to RadioShack and the auto parts store.
What you need:
- Aduino – Available in the Maker SHED
- MakerShield – Available in the Maker SHED
- Wire
- Pumpkin – Real, plastic or foam
- 12Volt battery
- Car horn – $7 at local auto parts store or junkyard
- Buttons and/or switches
- LEDs – Any color (orange is fitting.)
- Heat shrink tubing
Tools you need:
- Soldering Iron
- Pliers
- Pumpkin cutting/carving supplies
- Glue gun
Step 1: Cut up the pumpkin


Step 2: Add the nose button


Step 3: Add some LEDs to the eyes





Also, you could just wire up the horn to the button and put a couple of Throwies in the eyes. However, I really like the pulsing eyes, and the delay before the horn blasts. Using an Arduino makes this really easy…and fun.
Step 4: Wire up the horn

The positive (+) terminal from the battery connects to one terminal of the button. The other terminal of the button connects directly to the horn. The negative (-) terminal of the battery connects directly to the horn. Press the button for a sample blast!
Step 5: Attach the servo



Step 6: Add another LED

Step 7: Program the Arduino
Upload this code to your Arduino:
/*
MAKE Magazine 2008Ardumpkin or Pumpuino, your call?
By Marc de Vinck
*/#include <Servo.h> // loads the library for controlling a servo
Servo myservo; // create servo object to control a servo
int inputPin = 7; // choose the input pin (for a pushbutton)
int val1 = 0; // variable for keeping track of the button status
int val2 = 0; // variable used for PWM of LEDs
int ledrt = 10; //right eye led
int ledlt = 11; //left eye led
int ledmain = 6; //White LED in center of Pumpkin
int pos = 0; // variable to store the servo positionvoid setup() {
myservo.attach(9); // attaches the servo to pin 9 to the servo object
myservo.write(90); // tell servo to go to position “90” or “off” positionpinMode(ledrt, OUTPUT); // declare LED as output
pinMode(ledlt, OUTPUT); // declare LED as output
pinMode(ledmain, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare pushbutton as input
}void loop(){
val1 = digitalRead(inputPin); // read input value
if (val1 == HIGH) { // check if the input is HIGH
trick();
}
else {
treat();
}
}void trick(){
digitalWrite(ledmain,HIGH); //turn on main LED
digitalWrite(ledrt,HIGH); //turn on right eye LED
digitalWrite(ledlt,HIGH); //turn on left eye LEDfor(val2 = 0 ; val2 <= 255; val2+=2) // fade in (from min to max)
{
analogWrite(ledlt, val2); //write left led at power of “val”
analogWrite(ledrt, val2); //write right led at power of “val”
analogWrite(ledmain, val2); //write main led at power of “val”
delay(30); // waits for 30 milliseconds for dimming effect
}myservo.write(90); //set servo to “off” position
delay(10);myservo.write(45); //set servo to “on” position
delay(500); // stay “on for 1/2 secondmyservo.write(90); //set servo back to “off” position
delay(200);
digitalWrite(ledmain, LOW); // turn main pumpkin LED off
digitalWrite(ledrt,LOW); // turn right LED off
digitalWrite(ledlt,LOW); // turn left LED off
}void treat(){ // this fades the LEDs on/off until button press
for(val2 = 0 ; val2 <= 255; val2+=50) // fade in (from min to max) { analogWrite(ledrt, val2); analogWrite(ledlt, val2); delay(30); // waits for 30 milliseconds for dimming effect } for(val2 = 255; val2 >=0; val2-=50) // fade out (from max to min)
{
analogWrite(ledrt, val2); //write left led at power of “val”
analogWrite(ledlt, val2); //write right led at power of “val”
delay(30); // waits for 30 milliseconds for dimming effect
}
}

Looks like the kids are in for a shock this year. Hopefully the neighbors won’t mind after a few hundred blasts from that horn..
Note: Do not leave this pumpkin unattended. You don’t want anyone getting too close, since the horn is really loud and could cause hearing damage. You should be fine as long as you don’t put your ear right up to the pumpkin, however, you never know what a kid might do. Besides, you’ll want to be around to watch the fun!
ADVERTISEMENT




