/halloween-pumpkin

A Halloween project

Primary LanguageC++

Halloween pumpkin with multiple eyes

This is a Halloween project in which multiple servo controlled eyes placed into a pumpkin are moving randomly and a PIR sensor triggers different scary sounds to be played.

Hardware used

Software used

Arduino IDE config

1. Add Wemos D1 mini board support

This project uses a Wemos D1 mini so you need to add support for it in Arduino IDE. To do that, go to Arduino IDE -> Preferences -> Additional boards Manager URLs and add these:

2. Add the additional libraries needed

To control the DFPlayer mp3 player board and the Servo Motor Driver we need to add these additional libraries in Arduino IDE:

  • DFRobotDFplayerMini
  • Adafruit PWM Servo Driver

To add a library in Arduino IDE go to -> Sketch -> Include Library -> Manage Libraries -> Search for the library you need and select Install

Circuit diagram

TODO - You can find the circuit diagram in halloween-project.fzz (it opens with the Fritzing app)

DFPlayer info

  • The sdcard must be formatted with FAT or FAT32
  • All audio files must be placed under /mp3 folder
  • Audio file must be named 0001.mp3, 0002.mp3.....0255.mp3 (4 letters not 2 or 3 letters)
  • Audio file names can have any characters after 4 digits, such as 0001_Bruno_Mars.mp3

Note that beside the DFPlayer mp3 board you might also use other older boards like the wtv020m01, but that one can only play specific encoded files (ad4 format) and supports only non HC cards up to 2gb.