Shop Categories

Product Details

 tilt switch sensor ky 020 module black edc 272947 ky-020
tilt switch sensor ky 020 module black edc 272947 ky-020
MPN :
SKU : KY020Tilt-B26
Stock : 4pcs
Price:PKR 150.00
Click on the following link for product video demo presentation. https://youtu.be/gZA0_Vzbu9A

tilt switch module and a digital interface, built in 13 led build a simple circuit to produce tilt warning lamp 13 comes with digital interfaces of the led, the tilt switch sensor interface to access digital 3,when the tilt open off sensor senses a key signal, led lights, otherwise off.

routines source code:
int led  13  define led interface
int buttonpin  3  define the tilt switch sensor interfaces
int val  define numeric variables val
void 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 val
if val  high  when the tilt sensor detects a signal when the switch, led flashes

digitalwrite led, high 

else

digitalwrite led, low 
 
  • Google Checkout
  • Master Card
  • Paypal
  • Acc
  • Acc2
  • Visa

Copyright © 2014, All rights reserved.