Skip to main content

Menu

Mercury Tilt Switch Sensor Module Arduino Compatible

ARD2-2217
Arduino Compatible ARD2 Mercury Tilt Switch

$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. GST will be removed from your order if you are ordering from outside Australia.
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.

We use cookies to ensure you have the best experience on our site. If you continue to use this site you consent to the use of these cookies. OK

Find out more in our Privacy Policy