Skip to product information
NaN of -Infinity

vendor-unknown

Interfacing Tilt sensor with Arduino Uno showing output on led -KT759

Interfacing Tilt sensor with Arduino Uno showing output on led -KT759

SKU:KT759

1000 in stock

Regular price Rs. 750.00
Regular price Sale price Rs. 750.00
Sale Sold out
Shipping calculated at checkout.

Pickup available at REES52 OFFICE

Usually ready in 24 hours

For refund/return/replacement, call us at +91 95995 94524 , +91 95995 94520 or mail us at support@rees52.com

  • Delivery time with the Express Shipping option is 2-3 working days, and with the Standard Shipping option is 5-6 working days. It varies based on location, reliant on courier services.

  • Delivery time if the order item is on Preorder Status is 15-20 working days.
  • For COD you have to pay extra charges of Rs 350/- before the shipment. (We will share the company QR Code, UPI ID or Account details for the same)
View full details

KIT INCLUDED:


HARDWARE REQUIRED

SOFTWARE REQUIRED

Arduino IDE 1.8.5 (programmable platform for Arduino)

Click To Download :https://www.arduino.cc/en/Main/Software



PIN DESCRIPTION

TILT SENSOR



LED



CIRCUIT CONNECTION

The tilt sensor module can be connected to Arduino using suitable jumper wires. First of all connect the power supply lines; VCC and GND of the module to 5V and GND of the Arduino respectively. Next link the digital output (DO) of the module to digital pin 2 (D2) and analog output (AO) to analog input 0 (A0) of the Arduino. The whole hardware should be powered by a 9V DC / USB source through the DC IN /USB socket of the Arduino board. Keep the tilt switch position in an upright position as indicated in the figure shown below.

CODE



This example code wakes the onboard indicator (LED at D13) of the Arduino when a tilt is inputted by the tilt sensor module through the occupied digital input (D2). Just copy-paste this code into your Arduino IDE, compile, and upload it to your Arduino as usual.

const int statusLED = 13;

const int switchTilt = 2;

int val = 0;

void setup(){

pinMode (statusLED,OUTPUT);

pinMode (switchTilt,INPUT);

}

void loop(){

val = digitalRead(switchTilt);

if (val == HIGH){

digitalWrite(statusLED,HIGH);

}

else {

digitalWrite(statusLED,LOW);

}

}

Note that this code does not include a “software-debounce” feature commonly used with button/switch inputs. This is not necessary here because the tilt sensor module have a built-in (1ms) “hardware debounce” arrangement using a simple RC network (R-10K & C-100n).