loading

A few days before I started playing around with my Arduino again after almost a year of it being untouched. Having nothing to do I found a little buzzer in my huge pit of electronic components. I connected it and started coding stuff to it. About an hour later I had Jingle Bells playing on it. I found that fun and started thinking what I could do with this useless piece of Xmass code. So that's was when the Christmass Box idea emerged from the depths of my head. So what the crap is this ? Well it's a box. It consists of an Arduino Mega 2560 -Uno works too but mine broke down :( -, a Button, a speaker/buzzer and last but not least the Adafruit Thermal printer which I used just cause I had it lying around.

So let's head the the Parts List

Step 1: List of Parts

To make this project you will need the following:

1) Arduino Mega 2560 (Uno and possibly others work too) Adaruit | Sparkfun

2) Buzzer or Speaker. The latter will give better clearer audio (As clear as beeps can get :/) Adafruit | Sparkfun

3) A button of any kind |No links here ;)|

4) Mini Thermal Printer Adafruit | Sparkfun (Along with the psu and paper)

5) A shitton of jumpers (Male-Male) Adafruit | Sparkfun

6) A 9V battery for the Arduino (Optional you can use the thermal printer psu, I didnt)

7) A 9V battery socket (Optional)

8) A nice enclosure (The exact opposite of mine)

So that;s about it. Let's head to the construction (not the gmod map)

Step 2: Wiring and Construction

So below is the Wiring picture along with the Fritzing file:

I really hope you understand what's going on that's why I included the Fritzing file so you can edit it.

Now about the construction: I used a box from a CD Player (Yeap I still use those) In a few days I'm going to get a 3D Printer so hopefully I will make something better. Use your imagination on this matter.

Step 3: The Programming

Here you can find the Arduino Sketch. I will explain what each function does. It compiled just fine on Arduino 1.6.5 and will probably do too on earlier versions of the IDE.

-------------------------------------------------------------------------------------------------------------------------------------------

All those lines talking about Printers and Serials are about setting up a custom serial port that the printer needs to communicate with the MCU and assigning it to the printer. Also there are the button setup commands (The speaker is configured in the tone commands).

Then the MCU will check for a button input. Once one is triggered it will progress the script

The tone commands are for playing the music and work like this: tone (*pin*, *frequency*, time);

At the end the print commands print the little paper that says Merry Christmas

Loop that forever

PS I have made a typo in Christmas at the en of the sketch. Correct that plz

-----------------------------------------------------------------------------------------------------------------------------------------------

Step 4: The End

So that is the Christmass box. I hope you liked this project. Below is a video of it in action.

For any questions you may have or issues you might encounter leave a comment below and I will most certainly reply.

MERRY CHRISTMASS !!!!! :D

About This Instructable

526views

4favorites

License:

Bio: Student. I like arduinos and raspberry pis. I wish to study electronic engineering one day. Currently im interested in learning verilog
More by marios8543:The Christmas Box ! Fingerprint Scanning doorlock with access history printer Remote infrared telegram 
Add instructable to: