Build an Arduino-Powered Candy Vending Machine

When I was a kid, every year for Halloween instead of just handing out candy in a bowl our neighbor would create a magical machine that allowed kids to select one of four types of candy using a Morse code key hooked up to a buzzer. After keying in the code, a light bulb over the selection would illuminate and the candy bar would come flying out of a chute. The premise of The Machine was that it was fully automatic (imagine a box about the size of 12-pack of beer, sitting on a table, with a curtain strung up behind it), and they did a great job keeping the story going year after year.”

Link