Christmas is a time for giving, and we’re eternally grateful to all-round geek and The Pi Cast guest Richard Hayler for gifting us this Raspberry Pi project: a chocolate-dispensing advent calendar that will only dispense precisely one treat per day.
Hayler, a programme manager with Raspberry Pi who works on the Astro Pi project, created the treat distribution system using one of the popular single board computers, the Build HAT, some Lego components, the 3D RGB Christmas tree kit, and a stash of sweet, sweet candies, plus a bit of Python.
The Build HAT is a collaboration between Lego and Raspberry Pi which enables Lego electronic components, such as motors and sensors, to be used with the popular Python programming language.
A press of a button is all it takes to get this Donkey Kong-like tower of Lego to allow a chocolate to roll, barrel-like, down its sloping paths to the bottom, but it will only work if it hasn’t already handed out a confectionary tidbit that day. If one of the delicious delicacies has already been dispensed, a red light is all you get.
Hayler's YouTube channel reveals previous experiments with Pi-controlled Christmas lights, and a fabulous Lego Apollo 11 display case too.