   && (alarmVibrate || alarmSound)){
     currentState = ALARM;
     alarmLastStarted = currentMillis;
+   
+   
+     if(alarmVibrate){
+        lastMotorState = M_CLOCKWISE;
+        motorDriverState(true);
+     }
   }
 
 }

  }
}


void turnMotor(bool state, bool direction){
  if(state){
    digitalWrite(MOTOR_SLEEP_PIN, HIGH);
    if(direction){
      digitalWrite(MOTOR_PIN1, HIGH);
      digitalWrite(MOTOR_PIN2, LOW);     
    } else {
      digitalWrite(MOTOR_PIN1, LOW);
      digitalWrite(MOTOR_PIN2, HIGH); 
    }
    
  } else {
    digitalWrite(MOTOR_PIN1, LOW);
    digitalWrite(MOTOR_PIN2, LOW);  
    digitalWrite(MOTOR_SLEEP_PIN, LOW);
  }

}



unsigned long alarmLastStarted;

typedef enum{M_CLOCKWISE, M_PAUSE1, M_ANTI_CLOCKWISE, M_PAUSE2} MOTOR_STATE;
MOTOR_STATE lastMotorState;

unsigned long lastVibration;

unsigned long timeLastPressedLeftButton;
unsigned long timeLastPressedMiddleButton;
