is there such a thing as a tilt switch where the contacts are in the centre rather than at the ends. i want the component to detect shaking, so when it passes the contacts it flashes an led
My guess would be "no" as a tilt switch is exactly as the name describes; it detects a tilt, so the sensor would be at one end. But there is no reason you can't still use it, just have the sensor end slightly elevated.