There is nothing more frustrating than a push-button that seems to work at random. The good news, the fix is pretty simple: a resistor.
It may not seem obvious when you first start working with electronics but a "floating pin" doesn't have a defined "high" or "low" level. Remember from the Analog and Digital video, that Digital Electronics has defined voltage levels. Well, when you don't connect anything to the I/O pin of your microcontroller, the voltage level is undefined!
Episode #15 of AddOhms Looks like what happens when you leave a pin floating and how you can create a floating pin with a push button!
There's even a quick peek inside of my "studio"!
#15: Pull-Up Resistors and Push Buttons
First Launchpad / Energia Video
This epsiode is focused on a Launchpad from TI. The Energia project is an Arduino-like environment for Launchpad boards. Everything in the video applies to an Arduino. Over on my blog, I wrote about my first impressions of Energia and the Launchpad.