There are no tricks with this Raspberry Pi project—only treats available on demand thanks to this amazing, wearable project created by maker Yinglish119. Instead of just creating a simple candy dispenser, Yinglish119 has turned his idea into a totally portable and wearable Nerds costume that looks just like the candy it provides.
Yinglish119 himself is dressed in suspenders and bowtie combo while sporting a huge Nerds candy box which contains all of the Pi-powered goodness we love. To get the candy to dispense, users wave their hands in front of an ultrasonic sensor which triggers the mechanisms inside to dispense a box of candy out of the bottom of the giant Nerds box.
According to Yinglish119, the candy is magazine loaded and pushed through the bottom thanks to a continuously rotating servo motor. When the sensor detects a user, it initiates a wheel inside the suit which picks up a box of candy and moves it down the channel, guiding it out to the platform at the base of the costume.
Image 1 of 3
The candy dispensing suit is powered by a Raspberry Pi 4 connected to an ultrasonic sensor and servo. The sensor is definitely an HC-SR04, and the breadboard suggests that a potential divider is being used to drop the voltage from 5V to 3.3V for the Raspberry Pi’s GPIO. You can get 3V versions of the HC-SR04, namely the HC-SR04P and the HC-SRO4+, which we have used with the Raspberry Pi Pico. In addition to the electronics, Yinglish119 built a wooden frame and internal mounting components that help load the candy to the dispensing platform. Everything is hidden behind a shell that resembles a box of Nerds—albeit on a giant scale.
The Nerds costume is not only programmed to detect when it’s time to dispense candy, it also has a sensor to confirm that candy was delivered. In addition, Yinglish119 added an additional bit of code to prevent any jamming that might occur during the dispensing process.
If you want to get a closer look at this Raspberry Pi project or maybe even recreate it yourself, check out the original thread shared by Yinglish119 to Reddit and visit his official YouTube channel for videos of it in action.