Price

[[listData.currency]][[listData.discount_price]] [[listData.currency]][[listData.price]] save [[parseInt((1-listData.discount)*100) ]]%
[[listData.product_sku.sku_code.show_name]]
[[item.name]]
more
retract
Please select [[listData.product_sku.sku_code_add.show_name]]
[[listData.product_sku.sku_code_add.show_name]]
ADD TO CART BUY NOW ADD TO CART BUY NOW
  • No products in the cart.
      • [[item.title]]

        specifications: [[item.skuinfo]]

        price: [[item.currency]][[item.price]]

        [[item.currency]][[item.allPrice]]

  • You'll also love

    [[item.title]]

    [[item.currency]][[item.discount_price]] [[item.currency]][[item.price]]

    ADD
CHECKOUT [[currency]][[allPrice]]
christmas vacation deals 2024
Unlock Exclusive Deals Now!
Limited-time special prices shop your favorites before they're gone! Click below to start saving!
Go to see
[[num_page_4]]

Shop / dc motors fans

Vibration Switch Module KY-002

$ 5.00 $3.50
Selected product: [[dectitle]]
[[item.name]] [[pageData.currency]][[item.price]]
more
retract
Please select [[pageData.product_sku.sku_code_add.show_name]]
[[pageData.product_sku.sku_code_add.show_name]]
Add To Cart
Buy Now
Add To Cart
Buy Now

1. Omnidirectional, any Angle can be activated

2. This switch is suitable for small current tripping circuit
3. Operating voltage: 3,3 v ~ 5v
4. Digital switch output (0 and 1)
5. Dimensions: 0.94x0.59x0.35 inches (2,4x1, 5x0.9 cm)
6. Component model: sw-18015p


This module consists of a conductive spring, a 10k resistor, and 3 male header pins. Knocking or shaking the module will cause the spring to momentarily close the circuit.

Operating Voltage 5V
Board Dimensions 18.5mm x 15mm [0.728in x 0.591in]

CONNECTION DIAGRAM

Connect the module signal pin (S) to pin 3 on the Arduino.

Then connect the module’s power pin (middle) and ground (-) to +5V and GND on the Arduino respectively.

KY-002 Arduino
S Pin 3
middle +5V
– GND
Arduino KY-002 connection diagram

KY-002 ARDUINO CODE

The following Arduino sketch produces a shock flasher. The LED on Arduino pin 13 will flash when the KY-002 is knocked or shaked. Pin 3 receives the signal from the module.

int Led = 13; // define the LED Pin
int shock = 3 // define the sensor Pin 
int val; // define a numeric variable val 
void setup () {
	pinMode (Led, OUTPUT); // LED pin as output  
	pinMode (shock, INPUT); // input from KY-002 sensor
}
void loop () {
	val = digitalRead (shock); // read the value from KY-002
	if (val == HIGH ) {// when sensor detects shock, LED flashes  
		digitalWrite(Led, LOW);
	} else {
		digitalWrite (Led, HIGH);
	}
}

DOWNLOADS

BUY NOW BUY NOW