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.
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!
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.
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:
Hopping down the maker's trail this Easter is Repeated Failure with the most hilarious chocolate bunny project we've ever seen.