Sensitive Vibration Switch Sensor With Demo Code For Arduino
Sensitive Vibration Switch Sensor With Demo Code For Arduino
Vibration switch module for arduino with demo code
Description:
Introduction
Vibration switch is mainly used in electronic toys, small appliances, sports equipment and a variety of anti-theft devices and other products. Vibration switch because they have a flexible and sensitive trigger, and become an integral part of many electronic products, electronic components.
Specifications:
Note:
1, the scope: small current vibration switch. Products sloshing around in the horizontal electrical changes produced in low current circuit (secondary circuit) with a vibration sensor.
2 Operating temperature range: 5 ~ 70 º C Humidity 85 [%] or less.
3 Storage temperature range: 15 ~ 45 º C Humidity 80 [%] following storage for 90 days.
4 Test Status: Test and test if no special provisions under the following standard conditions Temperature: 5 ~ 35 º C Relative
Humidity: 45 [%] to 85 [%].
The use:
We first look at his specific pin functions
Also the only three leads, connect the power, after a good ground, we received a digital signal output port on
Can be used (we then use the 7th).
Fourth, the module test
Hardware Requirements
Arduino controller × 1
USB data cable × 1
Vibration switch module × 1
Led indicator × 1
Here, everything is ready, we will now begin to build a test circuit bar
Here we use it for a simple application that senses the vibration switch vibration LED is lit
Lights to warn it, there are unusual circumstances happen? ?
Well, look at the code under test it, maybe you can guess what will happen. . . . .
int ledPin = 13; / / signal indicator output pin;
int switchPin = 7; / / vibration switch input;
int value = 0; / / latch vibration switch key;
void setup ()
{
pinMode (switchPin, INPUT); / / Define port attribute;
pinMode (ledPin, OUTPUT);
}
void loop ()
{
value = digitalRead (switchPin); / / read the key state;
if (HIGH == value) / / there is vibration;
{
digitalWrite (ledPin, HIGH); / / steady state, led other off;
}
else
{
digitalWrite (ledPin, LOW); / / lit led lights;
}
}
The program features: Let vibration switch vibration, you can see the arduino board 13 pin led lights are lit for a while,
When the shaking soon will light or blink when.
Competitive Advantage:
1. Convenient & Friendly Customer Service
2. Low Prices Direct From Factory Suppliers
3. Fast Delivery Around the World.
4. High Quality With Global Standards.
5. 1 Year Factory Warranty
6. Safe Shipping Way and Payment
Send Inquiry to This Supplier
You May Also Like
-
Rectifier DiodeNegotiableMOQ: 2300 Pieces
-
Discrete Traics (Isolated) BTA41-200 BTA41-400 BTA41-600 BTA41-800 BTA41-1000 BTA41-1200US$ 0.1 - 0.2MOQ: 10 Pieces
-
Samsung 55-60lm 0.5W SMD 2835 LED DiodeUS$ 0.03 - 0.08MOQ: 2000 Pieces
-
DIODE TS820600 ST Electronic ComponentsUS$ 100 - 1,000MOQ: 1 Piece
-
Single Direction Diode for Microwave OvenUS$ 0.1 - 0.2MOQ: 1000 Pieces
-
Hot Sale!!! 50W Laser Diode Various Metal Label MarkingUS$ 7,000 - 10,000MOQ: 1 Set
-
445nm 1500mwNegotiableMOQ: 1
-
Semiconductor Controlled Rectifier For WelderUS$ 10 - 120MOQ: 100 Pieces
-
BZX84-C4V7 Active Components (Zener Diodes ) BZX84C4V7US$ 0.1 - 10MOQ: 1 Piece
-
Green Line Laser Diode ModuleUS$ 5 - 20MOQ: 5 Pieces