

The SparkFun RPI-1031 Tilt-a-Whirl Breakout is a compact and versatile breakout board designed for the Raspberry Pi. It simplifies the integration of tilt sensors into your projects, enabling precise tilt detection and orientation sensing. This breakout board is ideal for applications such as motion detection, robotics, gaming controllers, and other projects requiring tilt-based input.
With its user-friendly design, the RPI-1031 is perfect for both beginners and experienced developers looking to add tilt functionality to their Raspberry Pi-based systems.








The RPI-1031 breakout board has a simple 3-pin interface for easy connection to the Raspberry Pi or other microcontrollers.
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power input (3.3V). Connect to the 3.3V pin on the Raspberry Pi. |
| 2 | GND | Ground. Connect to the GND pin on the Raspberry Pi. |
| 3 | OUT | Digital output. Outputs HIGH (3.3V) when tilted and LOW (0V) when level. |
Connect the Pins:
VCC pin of the RPI-1031 to the 3.3V pin on the Raspberry Pi. GND pin to a ground pin on the Raspberry Pi. OUT pin to a GPIO pin on the Raspberry Pi (e.g., GPIO17).Mount the Breakout Board:
Secure the breakout board using the mounting holes to ensure stable operation.
Read the Output:
The OUT pin will output a HIGH signal (3.3V) when the tilt sensor is activated (tilted) and a LOW signal (0V) when the sensor is level.
Below is an example Python script to read the tilt sensor's output using the Raspberry Pi's GPIO pins.
import RPi.GPIO as GPIO
import time
TILT_SENSOR_PIN = 17 # GPIO pin connected to the OUT pin of the RPI-1031
GPIO.setmode(GPIO.BCM) # Use BCM pin numbering GPIO.setup(TILT_SENSOR_PIN, GPIO.IN) # Set the pin as an input
print("Tilt Sensor Test - Press Ctrl+C to exit")
try: while True: if GPIO.input(TILT_SENSOR_PIN): # Check if the sensor is tilted print("Tilt detected!") else: print("Sensor is level.") time.sleep(0.1) # Small delay to reduce CPU usage except KeyboardInterrupt: print("Exiting program.") finally: GPIO.cleanup() # Reset GPIO settings
---
No Output Signal:
Erratic Behavior:
Sensor Always HIGH or LOW:
GPIO Pin Not Responding:
Q: Can I use the RPI-1031 with a 5V microcontroller?
A: The RPI-1031 is designed for 3.3V operation. Using it with a 5V microcontroller may damage the board. Use a level shifter if necessary.
Q: How do I debounce the tilt sensor signal?
A: You can implement software debouncing by adding a small delay (e.g., 50ms) after detecting a tilt event to filter out noise.
Q: Can I use multiple RPI-1031 boards in one project?
A: Yes, you can connect multiple boards to different GPIO pins on the Raspberry Pi. Ensure each board has its own unique GPIO connection.
Q: Is the RPI-1031 compatible with Arduino?
A: While designed for the Raspberry Pi, the RPI-1031 can be used with Arduino boards that operate at 3.3V. Connect the pins accordingly and use digital input functions to read the sensor's output.
This concludes the documentation for the SparkFun RPI-1031 Tilt-a-Whirl Breakout. For additional support, visit the SparkFun website.