Basic Tilt Sensor Tutorial

The Theory
           The basic tilt sensor we are using acts very much like a push button does. The main difference is that you push the push button and with the tilt sensor, you tilt it! The picture below shows the two possible states of the tilt sensor.

           The way the tilt sensor works as you might have noticed above is that there's a conductive (metallic) ball inside of the tilt sensor and when not tilted, it connects the two wires of the tilt sensor. However, when you tilt the sensor, the connection is broken just like when you stop pushing on a push button.
           We will use this button-like 'on/off' capability in our project to tell the firmware to pause or to continue executing its current commands. Because we have to tilt the system, it will add a cool feeling of interactivity and you will get a great feeling for what to expect out of this basic tilt sensor.