Description
- SW-18015P/20P series are spring type, no directional vibration
- Sensor trigger switch any angle can trigger.
- Switch have identification P at the bottom, completly airtight
- In the normal, switch life can reach 200000 cycles lifespan
- This series switches have trigger high sensitivity
- Apply to security devices toys electronic scales products
Getting started Electronic Vibration Sensor.
In this tutorial we will use one vibration sensor or shake switch to make a beep sound from a buzzer while we shake our breadboard.
Step1: Hardware required
For this tutorial you will need:
- Arduino uno
- Breadboard
- Vibration Sensor
- Jumper wires
Step2: Connecting the hardware
The connections are pretty easy.
- Connect one pin of vibration sensor to Arduino Analog pin A0 and the other to 5V pin.
- Now connect the buzzer, one pin to Arduino pin 8 and the other to GND.
Step3: Making the code and Upload it!
In this example we will use one vibration sensor (or shake switch) to make a beep sound from a buzzer while we shake our breadboard. Download the code here and open it with Arduino IDE. Open the serial monitor from tools menu of Arduino IDE to test it.