• Home
  • All Brands
  • All categories
  • Our Career
  • Our Blogs
  • Special Offer's
  • Bulk Order
  • Track Order
  • Video Gallery

Tape/Knock Sensor Module Compatible for Arduino

(0 Reviews)
In stock

Category: Others Sensors

SKU: 2216


MRP Price:
₹99 /pc 36% OFF
Discounted Price:
₹64 /pc

Quantity:
(20 available)

Weight:
20 g

Total Price:
Bulk Order
Share:
  1. Detect shocks with the spring and send a signal to Controller Board
  2. Operating voltage: 3.3V-5V
  3. Digital output
  4. Bolt holes for easy installation.
There have been no reviews for this product yet.
int Led = 13 ;// Declaration of the LED output pin
int Sensor = 10; // Declaration of the sensor input pin
int val; // Temporary variable
void setup ()
{
  pinMode (Led, OUTPUT) ; // Initialization output pin
  pinMode (Sensor, INPUT) ; // Initialization sensor pin
}
void loop ()
{
  val = digitalRead (Sensor) ; // The current signal at the sensor will be read
   
  if (val == HIGH) //
 If a signal was detected , the LED will light up
  {
    digitalWrite (Led, LOW);
  }
  else
  {
    digitalWrite (Led, HIGH);
  }
}