The Raspberry Pi Advent Calendar that Dispenses Chocolate!

The modern Raspberry Pi + LEGO approach to Advent calendars is awesome.
Odin Odin (98)
0

The temptation of chocolate is ever-present in our lives. No matter how hard we try to hold out, no matter our convictions… at the end of the day, chocolate is just plain sinfully delicious. But that’s where technology can step in to save us from ourselves.

Watch the video:

This Raspberry Pi uses the Build HAT with attached LEGO components to create the perfect method of controlled chocolate delivery. Inventor Richard Hayler realized that his incredibly clever children would nick all the chocolates on December the 1st, then carefully close all the doors of the Advent calendar afterward. Naturally, Richard set out to solve this problem with the world’s smallest and most versatile computer.

Posted in these interests:
h/pi246 guides
Howchoo News
h/news82 guides
h/technology38 guides
"Re-Adventing" the calendar
"Re-Adventing" the calendar

Using the new Raspberry Pi Build HAT (which allows the Raspberry Pi to connect with various LEGO motors and sensors), Richard was able to knock out some precision motor control easily, especially when compared to just a few years ago when the process of attaching the two systems would have been a lot more complicated.

The Raspberry Pi keeps a log file of whenever chocolate is released. This is a genius stroke because it can’t be gotten around by simply rebooting the Raspberry Pi and tricking it into forgetting which day of the month it is. Instead, the system checks to see if a chocolate has been listed in its log file and combines that with its calendar, allowing it to be sure that no two chocolates are dispensed on any one day.

NAME
The Raspberry Pi keeps a log file of whenever chocolate is released.

The Build HAT Python library proved a massive boon in this process as well, providing a solid grounding for the software that Richard needed to get things going. Supplemented with code from the GPIO Zero Python library, he was even able to get his 3D LED Christmas tree blinking for an added festive flare!

The Raspberry Pi Build HAT
The Raspberry Pi Build HAT

Of course, no grand invention is entirely without risk, and Richard was forced to eat an incredible amount of chocolate himself for testing purposes, as getting the right size and shape took some serious experimentation.

GPIO Christmas tree
GPIO Christmas tree

The inventiveness of this machine is a real testament to Richard’s love of chocolate, and honestly sounds like the ideal project to share with the family afterward. This is why checking out the Raspberry Pi Build HAT is such a good idea! There are fairly unlimited projects that can now be accomplished with the astonishing extensive abilities of the HAT, supported by the huge Python libraries available to help you get off the ground with even the most original concepts.

Richard’s no stranger to other Raspberry Pi holiday projects, either, like these blinking Christmas lights! Looking at these, I already have so many ideas for things I could do with a Raspberry Pi to spice up the holiday vibe.

Watch the video:

Jamie Jamie (33)
0

Raspberry Pi is launching a new online storefront, Raspberry Pi Direct, specifically to sell bulk reels of their RP2040 microchips to customers.