Blog Home

Beat boredom with an Alexa-controlled, face-tracking candy launcher

Arduino TeamMay 14th, 2020

As many of us are stuck at home these days due to COVID-19, Harrison McIntyre decided to do something fun and “make it rain candy.” 

What he came up with was a build that uses a flywheel to launch M&M’s — speed regulated using magnets and a Hall effect sensor, and aimed with a few servos to control pitch and yaw. This allows it to fire in rapid succession, at an initial velocity of 23 miles per hour.

The device is powered by a pair of Arduino Nano boards along with a Raspberry Pi and USB camera. How it works is as follows: a Python script takes an image, runs facial detection, rotates the turret to point towards a face, does facial landmark detection to find the mouth, calculates the correct parabola, and finally tosses the candy. It’s even paired up with an Amazon Echo Dot that lets McIntyre simply ask for treats via Alexa commands!