 
 int SetupPin = 6; //a pin tells arduino to setup Standard Signal
 int StandardInputPin = 5;
-int SignalFlagPin = 4;//when it is high start reading signals from 4 channels
+int sigSent = 0;//when true, signal was sent from ROV
 //from the top right corner, piezos are labeled as 0, 1, 2, 3 clock-wisely
 int SignalInput0 = 0;
 int SignalInput1 = 1;
 int SignalInput2 = 2;
 int SignalInput3 = 3;
 
-
+int serialWen = 7;
 //need pins to get temperature data
 
 float getTemp();

	pinMode(SignalInput1, INPUT);
	pinMode(SignalInput2, INPUT);
	pinMode(SignalInput3, INPUT);
	pinMode(SignalFlagPin, INPUT);

}


		     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);
