Introduction: Tilt Sensor (Raspberry Pi)

Picture of Tilt Sensor (Raspberry Pi)

Basic tutorial of how to setup a Tilt sensor with the Raspberry Pi.

Step 1: Parts

Picture of Parts

RPI 3 – https://goo.gl/CdVNoH

4 Amp Power Adapter – https://goo.gl/js4Uc7

16GB Micro SD – https://goo.gl/js4Uc7

120 pcs jumper cable: https://goo.gl/js4Uc7

Tilt Sensor: https://goo.gl/js4Uc7

(ALT) Tilt Sensor: https://goo.gl/Jq7WDr

Step 2: Setup

Picture of Setup

VCC -> 5V

GND -> GND

DO -> GPIO 21

Step 3: Code

Picture of Code

1. Upload Script to RPI

2. To run script type: "python tilt.py"

Step 4: Additional Info

Picture of Additional Info

Comments

Glumgad (author)2017-12-24

Yes, you can make a lot of fun toys with a tilt sensor.

Like that for example https://www.instructables.com/id/Make-Your-Vampire-Robot-Dance/

About This Instructable

718views

13favorites

License:

Bio: the Raspberry Pi is Awesome!
More by piddlerintheroot:AIY VISION KIT (Raspberry Pi)Tilt Sensor (Raspberry Pi)Accelerometer (Raspberry Pi)
Add instructable to: