Twitter-enabled Candy Machine Dispenses Treats On Command

twitter-enabled-candy-dispenser

[Michael Nilsson] and [Markus Olsson] were contemplating how to motivate members of their dev team when they came up with the idea of a candy machine that automatically dispenses treats when someone has earned it.

They picked up a candy machine, a continuous rotation servo and a controller, then got busy automating the dispenser. The mechanism behind the operation is actually pretty simple as you can see in [Michael’s] writeup. They disassembled the machine, removing the gear from the manual crank, attaching it to the servo. Once the servo was mounted place, they installed the servo controller and connected it up to a spare laptop.

The heavy lifting is done by a Ruby script that uses the Twitter API to scrape any mentions of @_macke_ or @sidpiraya. Incoming messages are checked for the words “give” and “candy”, triggering the machine to fork out some sweets.

If you think that their hard work deserves a bit of recognition, feel free to send them some candy by tweeting “give @_macke_candy” or “give @Sidpiraya candy”. Just remember to be considerate – nobody likes spam, not even candy machines!

If you’re interested in seeing the machine in action, be sure to check out the candy dispenser’s live stream at giveawaycandy.com.