//THE ANALOG PIN FOR HEART RATE const int heartPin = A1; //THE DIGITAL PIN FOR VIBRATION MOTOR MODULE const int vib = 6; void setup() { Serial.begin(115200); pinMode(vib, OUTPUT); } void loop() { int heartValue = analogRead(heartPin); //printing for seeing the values at the computer, can be erased afterwards Serial.println(heartValue); delay(500); //I use 800 for my own alarm, set your heart-rate alarm as you wish if (heartValue > 800){ digitalWrite(vib,HIGH); delay (1000); digitalWrite(vib,LOW); } }