Introduction: Animated Chocolate Box (with Arduino Uno)
Once I saw a beautiful box of chocolate in a store. And the thought occurred to me to make an awesome gift out of this box - an animated box with chocolate.
What we need:
- Сlear plastic chocolate box
- 9V battery
- Battery cable adapter
- uSD 1GB
- Arduino Uno
- TFT Shield for Arduino
Step 1: Step 1. Prepare the Box
First, you need to open the box - gently tear off the golden adhesive tape so as not to tear it. Get the contents of the box: candy and plastic backing.
In the plastic backing cut a window for TFT shild and 9V batteries.
Step 2: Step 2. Arduino Uno and TFT Shield Preparation
- Sketch for Arduino Uno
Need to download the library https://github.com/YATFT/YATFT/archive/master.zip. In Arduino Uno you need to program the following sketch:
Video conversion and recording on micro SD
I edited a short video from a video downloaded from YouTube. To play a video in TFT shield it needs to be converted into a file with the extension *.rgb:
Download the conversion program at http://ffmpeg.org/download.html for your operating system. Install on computer. Convert the file with the following command:
ffmpeg -i video.avi -s 320x240 -pix_fmt rgb565 video.rgb
Write the resulting video.rgb file (264MB) to the microsd card (FAT32) and insert it into the TFT shield.
We join together Arduino Uno and TFT shield. Now we are ready to final assembly.
Step 3: Step 3. Final Assembly
At the last stage we carry out the final assembly of all components:
- We connect to the Arduino Uno cable adapter 9V.
- Carefully place the shield with Arduino Uno at the bottom of the box.
- Place the top of the plastic backing. Glue on the edges of the screen a golden adhesive tape, which at the very beginning was carefully removed from the box.
- We connect the battery 9V, we place it through a special window at the bottom of the box. Put the chocolate candies in the cells so that the candy wrappers do not close the screen.
- Close the box with a transparent lid. Enjoying the video :-)
Participated in the
4 years ago
Awesome! This would be an epic Valentines present.