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

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


	// Servo
	if (digitalRead(JoyV_SW) == HIGH) {
		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() != 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) {
