Site Navigation

Your Account

Choose Language

Introduction

This is a sensor, that when tilted opens the circuit. When the switch is vertical the switch is ON

Tools

No tools required.

Parts

Video Overview

Connect Pin 2 to the Tilt Switch.
  • Connect Pin 2 to the Tilt Switch.

  • The Tilt Switch isn't polarised, so you can plug it into either of the legs.

Add Comment

Connect the other leg of the Tilt Switch to Ground.
  • Connect the other leg of the Tilt Switch to Ground.

Add Comment

  • Copy this code and upload it to your Arduino.

  • Now when you move the sensor up and down, the ball will roll and the built-in LED (on pin 13) should turn on!

Add Comment

As the ball inside the tube rolls - the ball inside rolls down and touches the two contacts. As the ball inside the tube rolls - the ball inside rolls down and touches the two contacts.
  • As the ball inside the tube rolls - the ball inside rolls down and touches the two contacts.

Add Comment

Conclusion

At the end of this guide you will be able to hook up a tilt sensor and use it to turn a light on and off.

13 other people completed this guide.

Madeleine Schappi

Member since: 09/27/2017

4,527 Reputation

24 Guides authored

Team

Advent Edit Member of Advent Edit

Community

3 Members

24 Guides authored

2 Comments

I changed the pin to 7 and then set up an led on my bread board with - connected to ground. These short tutorials are great!

ZoeM - Reply

Agreed Agreed

john Zuill -

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 7

All Time: 136