Tilt Switch

The Tilt Switch, like other switches, is used to control the flow of electricity to an I/O pad. However, this is a special type of switch as it needs to be tilted (hence the name) for it to be turned on/off.

To use the switch, you just need to connect one end to a power output (+) and then the other end to an input ( A, B, C or D). 

Note: Don’t forget you will need to add batteries.

Screeny Shot 9 Nov 2017, 12.17.25

We use this block to monitor our chosen input. Whenever the button is pressed, current will be going through your chosen input e.g. B. You can change the options by clicking the letter or HI.

Screeny Shot 9 Nov 2017, 12.18.41

In this code, whenever B is HI (switch pressed down), the motor will run in forwards. When the switch isn’t pressed, the motor will stop – it will do this indefinitely.

Here is the tilt switch in action.

Where next?

There are numerous possibilities for a tilt switch. You could sense movement in a coat, detect if something is knocked over or even connect multiple switches together and create a tilt controller!