This Jack-o-lantern can see how far you are, calls you to come closer and then.... BOOO!
You will use an Arduino, LEDs, Distance Sensor and Sound system to help your Jack-o-lantern become possessed. From there you can customise your lantern to make it your own.
Part need to be prepared:
Jack-o-lantern
Arduino UNO
Jumper wires
LED strip WS2812B / Neopixel
Distance sensor XC3735 or XC4442
Sound module XC3748
Speaker AS3000
Mircro SD Card reader XC4740
Power bank MB3810
Spare USB cable WC7724
Step 1: Wire It Up
After collecting the parts, wire them up as seen below. Note that they all tie back to an external USB supply. We use this to supply enough power when everything is connected. The external jack can be a USB cord that you have cut and use the red/black wires.
In this edition the audio board is the JayCar XC3748
Step 2: Prepare SD Card
Format the SD card as FAT32 (google for this, just ensure you target the SD card)
Create a folder called 01
Place those files into the folder
Insert the SD card into the Audio Player
At a later date you can modify these files. Note that they are referenced by the number 001, 002 003 etc, the -snore etc is just for humans to read it. You will notice in the code there is a reference to files by numbers.
Step 3: Install Libraries for Arduino
We need the Adafruit NeoPixel and MD_YX5300 libraries
In Arduino, using the menu at the top, go to: Tools > Manage Libraries
Type "neopixel" in the top right search. Then click install on the one seen below
Connect your Arduino board via USB to your computer. Its light should turn on.
Step 4. Arduino code
In the Arduino IDE, Select your board, it should be an Arduino UNO MENU > TOOLS > BOARD > Arduino AVR > Arduino Uno
Select the Port your Arduino is connected to, you will know it because it appears/disappears when you connect/disconnect your Arduino. MENU > TOOLS > PORT > select your device
Upload the code by using the Upload button or in the menu, MENU > TOOLS > SKETCH > UPLOAD
Code can be download here
Step 5. Test and Scare Yourself
Step back, see that it works as expected. BOO! HAHAHAaAaaaaa
Step 6. Install into your Jack-O-Lantern
CAREFULLY, cut it open. Always cut AWAY from yourself to avoid injury.
Place your components into the Jack-O-Lantern
Place the LEDs so that they can be seen externally
Face the speaker so that the sound is projected out of the face of the lantern
Place the distance sensor to face forward out of the nose or mouth of the lantern
Run the External USB power cord out of the lantern
Re-seal the lantern after you have tested your spooky creation. A good idea is to make is to make it easy to access the Arduino's USB port so that you can make adjustments.
Step 7. Finish works
Congrats, I'm so glad you got to this point. One more crazy Jack-o-lantern and so much more Halloween festivities.
0 Comments: