Adding information from Limor Fried from Adafruit on debouncing a tilt sensor switch.