Introduction: Twitter Enabled Candy Machine

About: Imagine me, a Geek Ninja, riding atop a six-legged robot spider cyclops
Give away candy is a twitter enabled candy machine built by me and @sidpiraya

Tweet " give @_macke_ candy " or " give @Sidpiraya candy "  to give us candy and you can see it live at http://www.giveawaycandy.com/


Hardware:
  • Candy machine - Carousel Jukebox Gumball Machine
  • Servo - full rotation
  • Servo controller - we using a USB servo controller
  • Epoxy
  • Computer
The machine is a candy machine that we modified by glued a continuous full-rotation servo motor to ,see picture , and placed a servo contoler in.

How dos it work?
The computer has a ruby script that listens to twitters streaming api on mentions of @_macke_ and @sidpiraya. When receiving a message we use a regular expression to see if it contains “give” and “candy”. On a successful match the ruby script open a connection to a telnet server written in python that send a command to the servo controller.
Then the ruby script sends a message to the web page to display the last tweet. 

History:
If you are interested in the history of the candy machine you can read about it at Sidpirayas blog

Have fun giving us candy =)
/Marcus
http://www.slickstreamer.info/