Mercury Tilt Switch Sensor Module Arduino Compatible
ARD2-2217
$3.95
| QTY | Price |
|---|---|
| 1 | $3.95 |
Description
This Arduino compatible mercury tilt switch sensor module can detect when it is tilted. It works because the mercury ball flows into the gap between two electrodes and completes the circuit when the module is tilted at an angle.
The sensor opens and closes an electrical circuit through a small amount of liquid mercury. When the module tilts, it outputs low and the corresponding LED lights up.
Test Code
int Led = 13; // define LED Interface
int buttonpin = 3; // define the mercury tilt switch sensor interface
int val; // define numeric variables val
void setup() {
pinMode(Led, OUTPUT); // define LED as output interface
pinMode(buttonpin, INPUT); // define the mercury tilt switch sensor output interface
}
void loop() {
val = digitalRead(buttonpin); // read the values assigned to the digital interface 3 val
// When the mercury tilt switch sensor detects a signal, LED flashes
if (val == HIGH) {
digitalWrite(Led, HIGH);
}
else {
digitalWrite(Led, LOW);
}
}
Features
- Completes circuit when the module is tilted
- LED lights up when tilt switch is activated
Specifications
Board Colour
Black
Material
PCB
Resources
You Might Also Like
All prices are in Australian Dollars and include GST.
Wiltronics Online only delivers overseas in rare circumstances. If you can not source your desired product elsewhere, contact us at sales@wiltronics.com.au. Please note that minimum order quantities and processing fees apply, which will vary depending on delivery location.
Products may differ from pictured.
All trademarks and trade names are the properties of their respective owners. Wiltronics disclaims any proprietary interest in trademarks and trade names other than its own.