#include <SoftwareSerial.h>
SoftwareSerial bluetooth(10, 11); // RX, TX
int motorPin = 3; // Vibration motor connected to digital pin 3
void setup() {
pinMode(motorPin, OUTPUT); // Set the motor pin to output mode
}
void loop() {
if (bluetooth.available()) { // Check if there is data from bluetooth
digitalWrite(motorPin, HIGH); // Turn on the vibration motor
delay(1000); // Vibrate for 1 second
digitalWrite(motorPin, LOW); // Turn off the vibration motor
delay(1000); // Wait for 1 second
}