50% OFF! Hot items selling fast—Grab them before they're gone!
The HS-S27A 4-Way Tilt Sensor is a digital motion trigger module for detecting orientation changes, shaking, and tilt events. It is useful for anti-tamper switches, game controllers, robot posture detection, and simple motion-activated projects.
It can be combined with the ELAB Nano V3, RGB Full Color LED Module, and relay-controlled warning circuits. A four-way tilt element gives more direction-sensitive behavior than a single basic vibration switch.
Tilt switches are event sensors, not precision inclinometers. Use an accelerometer module if you need numeric angle measurement.
| Parameter | Value |
|---|---|
| SKU | HS-S27A |
| Product Type | 4-way tilt / vibration switch module |
| Output | Digital switch states |
| Sensing Method | Mechanical tilt contact |
| Typical Supply | 3.3V / 5V controller systems |
| Host Requirement | GPIO input |
| Use Cases | Tilt alarms, toys, anti-tamper, robot posture |
| Software Need | Debounce recommended |
| Not For | Precise angle measurement |
| Mounting | Orientation-sensitive |
Read the tilt sensor digital output.
const int sensorPin = 2;void setup() { Serial.begin(115200); pinMode(sensorPin, INPUT);}void loop() { Serial.println(digitalRead(sensorPin)); delay(100);}
Turn on an LED when the module is tilted.
const int sensorPin = 2;const int ledPin = 13;void setup() { pinMode(sensorPin, INPUT); pinMode(ledPin, OUTPUT);}void loop() { digitalWrite(ledPin, digitalRead(sensorPin));}
Monitor the digital output from a Pico-style board.
from machine import Pinimport timesensor = Pin(15, Pin.IN)while True: print(sensor.value()) time.sleep(0.1)
Q: Does it measure exact angle?
A: No, it detects tilt or vibration states.
Q: Why does it chatter?
A: Mechanical contacts bounce during movement.
Q: Can it detect shaking?
A: Yes, as a digital vibration event.
Q: Can I use it with Arduino?
A: Yes, with GPIO inputs.
Q: Is orientation important?
A: Yes, mount it in the desired reference direction.
Q: Can it wake a device?
A: Yes, if connected to an interrupt-capable input.
Q: What if I need roll/pitch values?
A: Use an accelerometer or IMU.
Q: Do I need debounce?
A: Yes, for reliable events.