Tuesday, June 11, 2013

Build your own automated candy machine Part 1.5 Hardware, Arduino

Since we did the first post how to build a candy machine we have moved from using a phidget to use a small Arduino. By using a Arduino we do not need any special software to get it working and only send a simple command over a regular serial port.

We are using a Pro Micro 5v/16MHz from Sparkfun, any small size arduino running on 5v should do. Connect wires to GND, RAW for power and pin 3 for signal. Using the Vcc pin will draw to much power and make the Arduino restart endlessly.


Use double sided adhesive tape to attach the Arduino.  




Clone the git repo https://github.com/evilmachina/giveawaycandy.git or download the ino directly candyServo.ino
Upload the candyServo.ino to the Arduino and test it by connect serial monitor to it and send "give".
Depending on the servo you may need to trim for how long it should spin.

Happy hacking!
Marcus