This product may not be available anymore. Click here for similar products.

KY-020 Tilt Sensor Details

  • The best price of KY-020 Tilt Sensor by TechDepot Egypt in Egypt is 20 EGP
  • Available payment methods are
    Cash on Delivery
  • Delivery fees are 35+ EGP, with delivery expected within 2-4 day(s)
  • The first appearance of this product was on Jul 31, 2016

Technical Specifications

Weight:5 g

TechDepot Egypt's Description

Description

KY-020 operates as a very simple switch that gets activated upon tilting the module board.

KY-020 Connecting

  • KY-020 Pin – = GND, connect to GND of the Arduino
  • KY-020 Pin (middel pin) +5 v, connect to Arduino +5
  • KY-020 Pin S signal, connect to Arduino pin 3

KY-020 Code

int Led =13;// define LED Interfaceint buttonpin =3;// define the tilt switch sensor interfacesint val ;// define numeric variables valvoid setup (){ pinMode (Led, OUTPUT);// define LED as output interface pinMode (buttonpin, INPUT);//define the output interface tilt switch sensor}void loop (){ val = digitalRead (buttonpin);// digital interface will be assigned a value of 3 to read valif(val == HIGH)//When the tilt sensor detects a signal when the switch, LED flashes{ digitalWrite (Led, HIGH);}else{ digitalWrite (Led, LOW);}}

Top Products in Circuit Componentsmore

    Reviews of KY-020 Tilt Sensor

    • No reviews exist yet for this product.

    Video Reviews of KY-020 Tilt Sensor

    • loading video reviews