/* * This Code was written by Nemeen Shah * Subscribe to my YouTube Channel: https://Youtube.com/NematicsLab * * Connect the Vibarion Sensor to pin 2 and 5V * * Full video on how to make Vibarion sensor - https://youtu.be/2uKfY-7G48g */ int Sensor_Pin = 2; //Connect the Vibarion Sensor to pin 2 void setup() { Serial.begin(9600); pinMode(Sensor_Pin,INPUT); } void loop() { if(digitalRead(Sensor_Pin)== 1) { Serial.println("Vibration Detected!"); } }