Introduction: Pumpkin Evil Inside

It's an a Jack-o-Lantern and a little pumpkin with electronic, that touching or hitting the little pumpkin, makes the light and starts to relase his evil (The sound) for have an interactive and funny pumpkin out of common

Supplies

-Regular Pumpkin

-Little Pumpkin

-Leds

-Arduino

-Wires

-Arduino MP3 Module

-Speaker

-Sound Sensor

-SD With scary sound

Step 1: Step 1: Carve Pumpkin.

Start drawing the face on the regular pumpkin and carving like a jack-o-lantern and make the top to clean the pumpkin

Step 2: Step 2: Put Leds.

Put leds on the inside of the pumpkin, put 1 on each eye, and 2 on smile. (The amount and position of leds is to your decision)

Step 3: Step 3: Connect Electronics.

Wire electronics, starting with the MP3 module to pin 10,11 Tx and Rx, Sound sensor to pin 8, and next wire all Leds to pins 2-5.

Put all electronics (Arduino, MP3 Module and Speaker) inside the pumpkin (Rememver put the SD to MP3 Sensor). (wait with the Sound Sensor)

Step 4: Step 4: Little Pumpkin

It's time to put the little pumpkin for this only open the top of the little pumpkin, clean it and put the sound sensor inside.

Close the pumpkin and try to put the little pumpkin above the carved pumpkin.

Step 5: Step 5: Code

Run the next code on the arduino, it makes that when sound sensor detect something turn on the pumpkin Leds and sound, with an other sound it stops.

#include SoftwareSerial.h
#include DFPlayer_Mini_Mp3.h

DFPlayerSerial(10, 11); // RX, TX //10,11

int PS = 8;

int PIzq = 2;

int PDer = 3;

int Var1 = 4;

int Var2 = 5;

bool Control = false;

void setup() {

pinMode(PS,INPUT);

pinMode(PDer,OUTPUT);

pinMode(PIzq,OUTPUT);

pinMode(Var1,OUTPUT);

pinMode(Var2,OUTPUT);

digitalWrite(PDer,LOW);

digitalWrite(PIzq,LOW);

digitalWrite(Var1,LOW);

digitalWrite(Var2,LOW);

Serial.begin(9600);

DFPlayerSerial.begin(9600);

mp3_set_serial(DFPlayerSerial);

mp3_set_volume(20);

}

void loop() {

if(digitalRead(8)){

Control = !Control;

if(Control){

mp3_play(1);

}else{

mp3_stop();

}

delay(1000);

}

digitalWrite(PDer,Control);

digitalWrite(PIzq,Control);

digitalWrite(Var1,Control);

digitalWrite(Var2,Control);

}

Step 6: Step 6: Let's Have Fun

Now the pumpkin is ready, you only need to touch or hit the little pumpkin and the scary Jack-o-Lantern is going to release all his evil (enjoy the sound to make a scary environment). :)

Pumpkin Challenge

Participated in the
Pumpkin Challenge