#define SensorINPUT 3 //Connect the sensor to digital Pin 3 which is Interrupts 1.
unsigned charstate = 0;
attachInterrupt(1, blink, FALLING);// Trigger the blink function when the falling edge is detected
state = 0;
What's the simplest way to check vibration with Arduino? Use a vibration
sensor from DFRobot. You can directly plug it on our IO Expesion Shield V7.
Just vibrate this sensor, Arduino can receive a digital signal. It's easy to
acount and program in Arduino.
Despite it's simple, you can make full use of it with creative thinking,
like step counting, Crash warning light and so on.
·Wide voltage range
from 3.3V to 5V
assembling structure (Times-of-5mm Center distance between two 3mm mounting
interfaces of sensors ("A" for analog and "D" for digital)
·Icons to simplely
illustrate sensor function
a simple Pedometer device that can count your step