 	pinMode(SignalInput1, INPUT);
 	pinMode(SignalInput2, INPUT);
 	pinMode(SignalInput3, INPUT);
-	pinMode(SignalFlagPin, INPUT);
+
+	pinMode(serialWen,OUTPUT);
 
 }
 

		float Angle0Y = angle(Time1, Time0, DPiezo, Volocity);
		float Angle0X = angle(Time0, Time3, DPiezo, Volocity);  
	}
}

		     Index3 = Index3 - SignalSetupLength;
		 */   
		Time0 = Index0 * TIMEGAP2;
		Time1 = Index1 * TIMEGAP2;// + TIMEGAP1;
		Time2 = Index2 * TIMEGAP2;//+ 2 * TIMEGAP1;
		Time3 = Index3 * TIMEGAP2;// + 3 * TIMEGAP1;

		//the original point is piezo2
		float Angle2Y = angle(Time2, Time3, DPiezo, Volocity);
