Project – Arduino House Advent Calendar

Project – Arduino House Advent Calendar


Let’s see how to make an Arduino House Advent Calendar, but first of all….a little intoduction.

What is an Advent calendar? It is a special calendar used to count the days of Advent in anticipation of Christmas.

Usually an Advent calendar is a rectangular box with “windows”, one for each day from 1 December untill 24 December. We will automatize it with Arduino!

Moreover in each of this windows there is a surpirse. More often there are candies!! We will make an Advent calendar that will give us a candy each day thanks to Arduino!

What do you need?

For this project we don’t need a lot of things. Let’s see what we need to make an Arduino House Advent Calendar!

  • Some pieces of polystyrene/cork for the design of the house
  • Arduino nano
  • Breadboard
  • 1 Button
  • Some Jumpers
  • 1 Servo motor

Moreover download and print this model. You have to use it with the servo and we will use it to push the candies!

How it Works?

This Advent calendar makes it magic for your children to obtain their daily candy. Infact they just have to push a button…and a candy will appear in the house!

We use a servo to push the candies. You havemake a pile of candies so that when the servo push one of it, then another candy will be ready for the next day. The servo will make it’s movement after that the button is pressed.

How it is made inside.


  • Wire the Servo as follows.
Servo Schematic
Servo Schematic
  • Wire the Button as follows.
Button Schematic

Then we have to create the model of the house. You can shape it as you like, the important thing is that you have to make a pile of candies and you have to be sure that the servo pushes the candies out.


You have to include the Servo.h library. Follow our tutorial about how to add a new library to Arduino IDE.

#include <Servo.h>

int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button
const int buttonPin = 10;

Servo myservo;  // create servo object to control a servo

void setup()
  myservo.attach(7);  // attaches the servo on pin 9 to the servo object

void loop()
  buttonState = digitalRead(buttonPin);
  if(buttonState != lastButtonState)
    if(buttonState == HIGH)
  lastButtonState = buttonState;

Very easy sketch! Now you have to make your own! Make it and publish it on Instagram! Add @gate.on.mechatronics tag to your posts and stories for a repost!

Davide Busco

Davide Busco is an engineering student at Federico II University of Naples. He uses his passion and studies to create his projects. He loves be a maker and spread his knowledge. Moreover he has gained the second place in a national makers-tournament between Italian's Universities.

Leave a Reply

Your email address will not be published. Required fields are marked *