Well, sometimes we need to switch something by position change or movement... It is easier than you thought!!!! I am going to cover 2 kinds of "motion" sensors in this instructable.
The first one is a ball-based vibration detector. It detects any kind of movement. It's only disadvantage is that the contact time is really short at this sensor, so you have to connect it to a very sensitive circuit or prolong the signal length by a programmed PIC, somehow like Xyzzy
did in his DIY RumblePak for Nintendo DS
The second one is a tilt sensor (well, it is ball-based, too). This is the sensor used in my other project, home-made Guitar Hero controller
. It is very simple and still quite effective!!!