 
 	// Servo
 	if (digitalRead(JoyV_SW) == HIGH) {
-		if (dvd_down.read() != start_pos) {
-			// Slowly move back to restart
-			for (int i = end_pos; i > start_pos - 1; i--) {
-				dvd_down.write(i);
-				delay(rot_speed);
+		if (dvd_down.read() != init_start_pos) {
+
+			unsigned long currentMillis = millis();
+			if (currentMillis - previousMillis >= interval) { // Execute on every interval
+
+				previousMillis = currentMillis; // Save the last time the motor moved
+				dvd_down.write(end_pos);
+				//move_stepper(StepPinH_Y, 100);
+				//digitalWrite(DirectionPinH_Y, LOW);
+				end_pos--;
+				
 			}
+		}
+		else {
+			end_pos = init_end_pos; // Reset end_pos
 		}
 	}
 
 
+
+
 	if (digitalRead(JoyV_SW) == LOW) {
-		if (dvd_down.read() != end_pos) {
-			for (int i = start_pos; i < end_pos + 1; i++) {
+		if (dvd_down.read() != init_end_pos) {
+			unsigned long currentMillis = millis();
+			if (currentMillis - previousMillis >= interval) { // Execute on every interval
+
+				previousMillis = currentMillis; // Save the last time the motor moved
+				dvd_down.write(start_pos);
+				start_pos++;
+			}
+		}
+		else {
+			start_pos = init_start_pos; // Reset start_pos
+		}
+		/*
+			for (int i = start_pos; i < init_end_pos + 1; i++) {
 				dvd_down.write(i);
 				delay(rot_speed);
 			}
-		}
+		*/
+		
 	}
-
 }
 
 void move_stepper(int motor_pin, int delay_val) {

#define JoyV_Y                    A3

// Servo
int start_pos = 100;
int end_pos = 145;
int rot_speed = 30;
int current_pos;

Servo dvd_down;



	pinMode(JoyV_SW, INPUT);
	digitalWrite(JoyV_SW, HIGH);
	dvd_down.attach(ServoV);
	dvd_down.write(init_start_pos);

	Serial.begin(9600);
	Serial.print("Ready");
