How I do it: Dropbox


If you don’t have Dropbox installed stop what you’re doing and install it.

Go ahead.

I’ll wait.

For those not “in the know”, Dropbox is free a cloud based backup/psedo-versioning system. And it’s awesome, oh, and it’s free. Note: I really like Dropbox but Google Drive, SpiderOak,, Microsoft SkyDrive, and BitTorrent Sync are all good alternatives. The important thing here is to backup your files! I also use Dropbox to keep my 3D modeling software in sync, here’s how I do it.

Continue reading “How I do it: Dropbox”

Am I doing this right? (Reddit Upvote Button)


Update! My project has been entered in the Instructables “USB Contest” if you like it please vote here:

Not too long ago I saw the “Awesome Button” video on the Make Magazine podcast. In the video Matt Richardson shows how you can take a Teensy development board and turn it into a simple USB keyboard. In his example everytime a button is pressed a synonym for the word “awesome” is sent to the computer. While this is a pretty neat project the idea of creating a simplified keyboard out of a few buttons is what stuck with me. This lead me to start creating my “Reddit Upvote/Downvote button”.

Reddit is a website that has in the past few months taken over my life. Not unlike Digg it aggregates all the best stuff on the internet and makes it easy to consume. The way posts are sorted or brought to the front page on Reddit has to do with the number of Upvotes and Downvotes a post gets over time. Now while these voting options are usually toggled by clicking arrow icons on the webpage they can also be controlled using keystrokes after installing the Reddit Enhancement Suite. After I found this, all the stars aligned for my project.

I started by sketching out a basic design enclosure and making some measurements for the parts I planned on including. The Teensy development board really is teensy so my project box ended up being pretty tiny. In the gallery below you can see the evolution of the project box. I started off with a pretty large box and scaled down to just big enough to fit what I needed. It’s pretty amazing to be able to print a box that fits your exact project dimensions in about 30 minutes. I also printed up and down arrows, the upvote arrow using red plastic and downvote colored blue with a Sharpie. As usual I’ve uploaded my most recent model to Thingiverse as STLs and Sketchup files. These can be downloaded and printed in the comfort of your own home (assuming you own a 3D printer of course).

Programming the keyboard functions on the Teensy is surprisingly simple. There are great instructions on the Teensy development board page for sending keystrokes to your computer and because the board identifies itself as a USB keyboard it works when plugged into a PC or Mac with no additional software! One note: to use the USB keyboard mode you must use the “Teensyduino” software which allows you to program the Teensy using the Arduino programming language and IDE rather than the native Teensy language. I’ve included the code in full at the bottom of the post, but to give a brief overview, when the upvote button is pressed the key combination “CTRL + SHIFT + A” is sent to the computer over USB, likewise if downvote is pressed “CTRL + SHIFT + Z” is sent to the computer. I defined these keystrokes in the Reddit Enhancement Suite manually because they seemed like a key combination that wouldn’t conflict with other programs (default is “a” and “z”).

Above is a drawing of the circuit I put together for the buttons. As you can see it’s really simple and basically an exact copy of the “Button” example on the Arduino website. I moved the circuit from my breadboard to a scrap of circuit board I had left over from my Arc Reactor project and soldered everything down. Since I was looking to fit this into a pretty small space my tolerances (wire length, etc) were also small. Much to my surprise everything worked on my first attempt to move it to a finished board. The only thing left to do was reconnect the USB cord I snipped in half to fit into my project box and put a couple dabs of hot glue on the lid to keep it closed.

Below is a collection of video clips I took while putting this project together. I think it turned out pretty nice and is a great example of the different ways to change a previous project (yours or in this case, someone else’s the “Awesome Button”) into something to fit your needs.



Reddit Upvote/Downvote Button
This code sends the keystroke "CTRL + SHIFT + A" or "CTRL + SHIFT + Z" to your PC
or Mac. Make sure you set your Arduino compatible board to "Keyboard + Mouse" in
the "USB Type" menu. Hotkeys can be changed easily, I've added comments to make it
easier to find. 

For this to work with Reddit as an Upvote/Downvote button you will need to install
Reddit Enhancement Suite ( and set your Upvote and
Downvote hotkeys to the ones assigned in this Arduino sketch.
Code examples edited and reworked from and
TheNewHobbyist 2011 

// The inputs you're using for button presses
const int upVote = 8;     // Upvote
const int downVote = 5;     // Downvote

int upVoteStatus = 0;
int downVoteStatus = 0;

void setup() {
  pinMode(upVote, INPUT);
  pinMode(downVote, INPUT);   

void loop(){
  // Check the buttons
  upVoteStatus = digitalRead(upVote);
  downVoteStatus = digitalRead(downVote);

// If Upvote button is pressed  
  if (upVoteStatus == HIGH) {
     // Change the following two lines to change the keys sent     
    Keyboard.set_modifier(MODIFIERKEY_CTRL | MODIFIERKEY_SHIFT); 

// If Downvote button is pressed
  if (downVoteStatus == HIGH) { 
     // Change the following two lines to change the keys sent    
    Keyboard.set_modifier(MODIFIERKEY_CTRL | MODIFIERKEY_SHIFT); 

[thingiverse thing=10423]

Motion activated “Attack Creeper”!

That's a nice everything you have...


Update! I’ve been entered in the Instructables challenge contest. If you like my project please vote for it. Here’s the link to my instructable:

In January I decided that I needed to upgrade my in-home security. Unfortunately for me my building does not allow dogs so a big scary animal was not an option. Then suddenly, inspiration struck or I guess you could say exploded.

The most logical option was obviously to create a near life size Arduino powered, motion activated, audio playing, remote controllable Minecraft Creeper. Obviously.

As always this started with a fairly lengthy list of relatively inexpensive supplies. Here’s the most complete list I can compile from memory.

The electronics

  • Arduino UNO (all good projects start with an Arduino)
  • Ada Fruit Wave Shield (for audio playback with the Arduino)
  • Electric Sumo CMoy Amp (I wanted to build one of these anyway so I picked it up for the project)
  • Cheap RC Car (I picked mine up for $15 at the drug store)
  • PIR Sensor
  • Speaker (mine came with my Wave Shield kit)
  • Various bits of wire
  • Batteries, lots and lots of batteries
  • Something to power the Arduino (I used a Minty Boost also from Adafruit)


And the crafty bits

  • Cardboard boxes
  • Paint
  • Hot glue (I used the normal stuff to hold the electronics in place and some heavy duty pull-the-skin-off-your-hands industrial stuff to hold the boxes together
  • Masking or painters tape
  • zip ties/cable ties


OK So first lets build a cardboard creeper. I sketched out the basic idea to help me find boxes that fit the correct proportions. I wouldn’t want a disproportionate in-home “Attack Creeper” because that would be ridiculous.

My first step was cutting holes to allow me to run cables internally from box to box and opening up some access doors on the back of each box. I also cut holes in the bottom box to allow me to thread cable ties through the bottom and around the RC car and opened holes for the PIR sensor and speaker. After this was done I connected the three cardboard boxes that make up the body using some heavy duty hot glue. This stuff will pull the laminate off your desk before it pulls off, serious stuff. Everything got a coat of “Creeper Green” paint and I masked off the eyes and mouth for a coat of “Soul-less Killing Machine Black”.

Next step electronics!

My program basically works like this

  1. Detect motion with the PIR sensor
  2. Play fuse.wav (aka Tsssssssss…) via the Wave Shield
  3. Trigger the “Forward” button on the RC car remote for 2 seconds
  4. Play explode.wave via the Wave Shield
  5. Wait 10 seconds and reset

Here’s a wiring diagram which explains how this monster is hooked up.

The PIR sensor was really easy to hook up using the instructions available on Adafruit’s website. I imagine any sensor that measures distance or detects motion could be used in place of this. I will say (for better or worse) using the example code for the PIR sensor made it very sensitive, maybe too sensitive.

The RC car came with a simple remote that contained four momentary micro push buttons. I just wired into one side of the “forward” button and used the Arduino to turn the button. I also removed most of the body of the RC car leaving just the wheels, motors and frame.

I copied the in game sound effects from Minecraft to the SD card in the wave shield for playback. The output volume of the Wave Shield on it’s own is pretty quiet so I ran it through the CMoy Amp to boost it’s volume to a appropriately scary level.

After I was sure I had everything working I used some standard craft hot glue to glue the speaker and PIR sensor inside of the Creeper body. I also glued the back of the body closed because as I learned it’s nearly impossible to get tape to stick to acrylic paint.

Here’s a montage of the little guy working. He’s just so adorable I could explode.

Now if you make your own motion activated “Attack Creeper” you’ll find the real fun is hiding in places around the house your roommates and/or significant other would not expect it.

And since someone might be interested in my terribly mashed up code here’s the code I used to run the thing. I used the example code for the PIR sensor and Wave Shield both available on to create this mostly functional code. Use at your own risk!

Motion activated "Attack Creeper"
Detects motion using a PIR sensor. When motion is detected plays two wave files and activates RC remote.
Code examples edited and reworked from
TheNewHobbyist 2011 
#include "WaveUtil.h"
#include "WaveHC.h"
SdReader card;    // This object holds the information for the card
FatVolume vol;    // This holds the information for the partition on the card
FatReader root;   // This holds the information for the filesystem on the card
FatReader f;      // This holds the information for the file we're play
WaveHC wave;      // This is the only wave (audio) object, since we will only play one at a time
// for PIR
int ledPin = 13;                // choose the pin for the LED
int inputPin = 6;               // choose the input pin (for PIR sensor)
int pirState = LOW;             // we start, assuming no motion detected
int val = 0;                    // variable for reading the pin status
#define DEBOUNCE 5  // button debouncer
// this handy function will return the number of bytes currently free in RAM, great for debugging!   
int freeRam(void)
extern int  __bss_end; 
extern int  *__brkval; 
int free_memory; 
if((int)__brkval == 0) {
free_memory = ((int)&free_memory) - ((int)&__bss_end); 
else {
free_memory = ((int)&free_memory) - ((int)__brkval); 
return free_memory; 
void sdErrorCheck(void)
if (!card.errorCode()) return;
putstring("nrSD I/O error: ");
Serial.print(card.errorCode(), HEX);
putstring(", ");
Serial.println(card.errorData(), HEX);
void setup() {
byte i;
// set up serial port
putstring_nl("WaveHC with ");
putstring("Free RAM: ");       // This can help with debugging, running out of RAM is bad
Serial.println(freeRam());      // if this is under 150 bytes it may spell trouble!
// Set the output pins for the DAC control. This pins are defined in the library
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, INPUT);
pinMode(8, OUTPUT);
//  if (!card.init(true)) { //play with 4 MHz spi if 8MHz isn't working for you
if (!card.init()) {         //play with 8 MHz spi (default faster!)  
putstring_nl("Card init. failed!");  // Something went wrong, lets print out why
while(1);                            // then 'halt' - do nothing!
// enable optimize read - some cards may timeout. Disable if you're having problems
// Now we will look for a FAT partition!
uint8_t part;
for (part = 0; part < 5; part++) {     // we have up to 5 slots to look in
if (vol.init(card, part)) 
break;                             // we found one, lets bail
if (part == 5) {                       // if we ended up not finding one  🙁
putstring_nl("No valid FAT partition!");
sdErrorCheck();      // Something went wrong, lets print out why
while(1);                            // then 'halt' - do nothing!
// Lets tell the user about what we found
putstring("Using partition ");
Serial.print(part, DEC);
putstring(", type is FAT");
Serial.println(vol.fatType(),DEC);     // FAT16 or FAT32?
// Try to open the root directory
if (!root.openRoot(vol)) {
putstring_nl("Can't open root dir!"); // Something went wrong,
while(1);                             // then 'halt' - do nothing!
// Whew! We got past the tough parts.
TCCR2A = 0;
TCCR2B = 1<

Arduino powered Haunted Mansion Halloween

As I posted previously I wanted to put together a Halloween display emulating my favorite Disneyland/world ride of all time. Originally this was just going to be four heads on a table with the Haunted Mansion’s “Grim Grinning Ghosts” playing on a loop.

After I started learning to program my Ardunio this evolved into a photocell actuated video on demand Halloween display. I used an example I found on to control a Dell Mini 9 laptop using AutoHotKey. When the photocell switch it tripped the Arduino sends a serial signal to the Dell laptop which is converted to a keystroke by AAC Keys which in turn triggers the below AutoHotKey Script and finally plays back using VLC.

I had access to a industrial photocell switch (just like at Disneyworld!) which required an additional 12v power supply but I imagine this could be modified to work with a cheap ultrasonic or IR range finder.

This AutoHotKey script is running on the PC waiting for the “a” key to be pressed. When the key is pressed VLC launches full screen and ignores input for the duration of the video (60 seconds). It then closes VLC and waits to be triggered again.

Run, c:Program FilesVideoLANVLCvlc.exe -I rc "VIDEO_FILE_NAME"
Sleep, 61000 ; Pause for video to play, prevents triggering multiple times.
Process, close, vlc.exe ; Kill vlc and make sure it stays dead.

This Arduino sketch waits until the Photocell switch on pin 2 is tripped, then sends a serial character to the Dell laptop it’s connected to. It also ignores any input during video playback to avoid confusing the computer.

Serial Keyboard
Used to send keystrokes to a Windows PC running AACKeys.exe which
turns serial data into keystrokes. Best used in conjunction with
Examples and idea based on the work of and
information from
TheNewHobbyist 2010 
// Initialize variables
const int buttonPin = 2;
const int ledPin =  13;
int buttonState = 0;
// Set inpout/output and start serial
void setup() {
pinMode(ledPin, OUTPUT);      
pinMode(buttonPin, INPUT);
// Main code loop
void loop(){
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {     
digitalWrite(ledPin, HIGH);
Serial.print("a"); // send key to PC to start video playback
delay(61000); // ignore input until video ends
else {
// turn LED off:
digitalWrite(ledPin, LOW); 

Here are the installation photos and video compilation (note: the audio is a little out of sync after uploading to youtube).

While we didn’t get too many trick-or-treaters this year the ones that stopped by after dark really enjoyed it. I’m really happy with the way this turned out and I recommend anyone new to Arduino give it a shot. It really wasn’t hard to put together and they payoff was great.

Arduino Powered Arc Reactor Part 2/2

So now that the hard part was over (writing the animation sketch for my Arduino) I started on the fun part, making the Arc Reactor a wearable Halloween prop.

About halfway through my build I found a great post on building a prop Arc Reactor on Instructables by msraynsford which used most of the same materials I had picked for my own. Great minds think alike I guess…

I picked up a rectangular PCB at Radioshack to mount my LEDs to. It seemed like a secure way to keep everything in place while wearing it, plus an excuse to brush up on my soldering skills. I used a scroll saw to cut the PCB into a 4 inch round. Then mounted the LEDs on the board spaced in an even ring (note: the extra LEDs pictured on the PCB would have resulted in my Arduino turned into a pile of slag and were removed). I also used this time to drill a couple of holes in my Altoids tins for holding my 9v battery and Arduino board.

Cutting PCB to size
4 inch round PCB
LEDs mounted in a ring

After cutting the PCB to size I soldered the LEDs and resistors to the board and some lengths of hookup wire so I could feed them directly into the board for testing.

I had my fingers crossed the whole time and as you can see from the video everything worked just as expected. Somehow I managed to do it all without soldering my fingers together.

Now that I had a working board I cut off the ends of an old serial cable and used the 8 conductor wire to extend the hookup wire. I added about 2 feet of wire or enough to reach the battery pack I planned on keeping in my pocket and wired a 9 volt battery to the Arduino board for power. I also hot glued the hookup wires into the outputs on the Arduino board. From what I’ve seen online this is the best semi-permanent way to make connections on the board and comes off with a little rubbing alcohol. Then fit everything snugly into my two Altoids tins so I could easily fit the battery and Arduino around in my pocket.

Ready for soldering
Just enough wires for the job

The modeling plastic I used comes in a container as small white plastic beads. When heated with hot water they turn transparent and mailable like a firm clay. As it cools it returns to a very hard white plastic. Since this happens fairly fast I wasn’t able to take any pictures of the molding process. I used items I had around the house with shapes similar to what I wanted to see on the faceplate and pressed the plastic around them. Then while the plastic was still warm I stretched it around the sides of the PCB and allowed it to cool. After cooling it held on really firmly to the board. I also velcro’ed a pocket on the inside of a t-shirt to hold the arc reactor while I was wearing it. The Arc Reactor and Arduino ran for over 8 hours on one 9 volt battery (I left it on over night so I’m not sure of the exact time).

Below are pictures of the finished Arc Reactor.

And the final video

Overall I’m pretty happy with how it turned out. I’m planning on taking what I learned and trying to get my hands on some laser cut metal parts for next year. I’d like the Arc Reactor to look as cool outside of the shirt as it did inside.