 int start_pos = 100;
 int end_pos = 145;
 int rot_speed = 30;
+int current_pos;
 
 Servo dvd_down;
 

	//Serial.println(analogRead(JoyH_Y));
	//Serial.println(analogRead(JoyV_Y));
	//Serial.println(analogRead(JoyV_X));
	Serial.println(digitalRead(JoyV_SW));

	// Big
	if (analogRead(JoyH_Y)<400)
	{
		move_big();
		digitalWrite(DirectionPinH_Y, LOW);
	}

	if (analogRead(JoyH_Y)>600)
	{
		move_big();
		digitalWrite(DirectionPinH_Y, HIGH);
	}
	
	// Scanner
	if (analogRead(JoyH_X)<400)
	{
		move_scanner();
		digitalWrite(DirectionPinH_X, HIGH);
	}

	if (analogRead(JoyH_X)>600)
	{
		move_scanner();
		digitalWrite(DirectionPinH_X, LOW);
	}

	// DVD
	if (analogRead(JoyV_Y)<400)
	{
		move_dvd();
		digitalWrite(DirectionPinV_Y, HIGH);
	}

	if (analogRead(JoyV_Y)>600)
	{
		move_dvd();
		digitalWrite(DirectionPinV_Y, LOW);
	}

	// Servo

	//if (analogRead(JoyV_X)<400)
	if (digitalRead(JoyV_SW) == HIGH)
	{
		Serial.println(digitalRead(JoyV_SW));
		if (dvd_down.read() != start_pos) {
			// Slowly move back to restart
			for (int i = end_pos; i > start_pos - 1; i--) {

		}
	}


	if (digitalRead(JoyV_SW) == LOW)
	{
		//Serial.println(digitalRead(JoyV_SW));
		if (dvd_down.read() != end_pos) {
			for (int i = start_pos; i < end_pos + 1; i++) {
				dvd_down.write(i);
				delay(rot_speed);
				
			}
		}
	}

}

void move_stepper(int motor_pin, int delay_val) {
	digitalWrite(motor_pin, HIGH);
	delayMicroseconds(delay_val); //big motor

	digitalWrite(motor_pin, LOW);
	delayMicroseconds(delay_val); //big motor
}