 		}
 		if ((temp2 & 0x01) != (buff & 0x01))
 		{
-			digitalWrite(13, HIGH);
 			dirty = true;
+#if debug
+			Serial.print('_');
+#endif
 		}
 		else{
-			digitalWrite(13, LOW);
+#if debug
+			Serial.print('!');
+#endif
 		}
 
 		//最終ビット

			if ((!dirty) && (byteNo == 4) && ((buff & 0x70) == parity))
			{
				//正常
				RightMotor(Rmotor);
				LeftMotor(Lmotor);
				ServoMotor(servoVal);

}

//発射(開始、停止)
#if 0
void launch(bool mode){
	if (mode)
	{
		if (launchMode)
		{
			//発射中(長押し)
			//開始からの時間で判定
			launchEnd = micros();
			launchTempTime = launchEnd - launchStart;
			if (start2endT > launchTempTime)
			{
				//現在OnにするかOffにするか判定(launchTempTime=開始してからの時間)
				if ((launchTempTime % ledSumT) <= ledOnT)
				{
					digitalWrite(launch_LED, HIGH);
					//digitalWrite(launch_LED2, LOW);
				}
				else{
					digitalWrite(launch_LED, LOW);
					//digitalWrite(launch_LED2, HIGH);
				}
				launchButtonReleased = false;
			}
			else
			{
				//停止
				digitalWrite(launch_LED, LOW);
				//digitalWrite(launch_LED2, HIGH);
				digitalWrite(launch_LED2, LOW);
				launchMode = false;
				launchButtonReleased = false;
			}
		}
		else
		{
			//発射終了後長押しもしくは開始
			//ボタンをオフにしないと次を打てない
			if (launchButtonReleased)
			{
				//発射開始
				//終了からの時間経過で判定
				launchStart = micros();
				launchTempTime = launchStart - launchEnd;
				if (end2startT < launchTempTime)
				{
					digitalWrite(launch_LED, HIGH);
					digitalWrite(launch_LED2, HIGH);
					//digitalWrite(launch_LED2, LOW);
					launchMode = true;
				}
				launchButtonReleased = false;
			}
		}
	}
	else
	{
		launchButtonReleased = true;
		if (launchMode)
		{
			//離していても時間が経ってないなら判定を行う
			//開始からの時間で判定
			launchEnd = micros();
			launchTempTime = launchEnd - launchStart;
			if (start2endT > launchTempTime)
			{
				//現在OnにするかOffにするか判定(launchTempTime=開始してからの時間)
				if ((launchTempTime % ledSumT) <= ledOnT)
				{
					digitalWrite(launch_LED, HIGH);
					//digitalWrite(launch_LED2, LOW);
				}
				else{
					digitalWrite(launch_LED, LOW);
					//digitalWrite(launch_LED2, HIGH);
				}
			}
			else
			{
				//停止
				digitalWrite(launch_LED, LOW);
				digitalWrite(launch_LED2, LOW);
				//digitalWrite(launch_LED2, HIGH);
				launchMode = false;
			}
		}
	}
}
#else
void launch(bool mode){
	if (mode)
	{
		//終了からの時間経過で判定
		launchStart = micros();
		launchTempTime = launchStart - launchEnd;
		if (end2startT < launchTempTime)
		{
			launchEnd = launchStart + start2endT;
			digitalWrite(launch_LED2, HIGH);
			LeftMotor(32);
			RightMotor(32);
			Turn_Stop();
			launchEnd = micros();
			launchTempTime = launchEnd - launchStart;
			while (start2endT > launchTempTime)
			{
				delayMicroseconds(ledOffT);
				digitalWrite(launch_LED, HIGH);
				delayMicroseconds(ledOnT);
				digitalWrite(launch_LED, LOW);
				launchEnd = micros();
				launchTempTime = launchEnd - launchStart;
			}
			digitalWrite(launch_LED2, LOW);
			Serial.flush();
		}
	}

}
#endif

//サーボモーター(0～63を+0～180へ)
void ServoMotor(unsigned char val){
	Serial.write('A' + (val >> 2));
	myservo.write(((int) val));
}

//右モーター(0～63を+-0～255へ)
void RightMotor(unsigned char val){
	if ((val == 32) || (val == 31))
	{
		digitalWrite(Right_A, LOW);
		digitalWrite(Right_B, LOW);
