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

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

		int Result[]);
float angle(float time1, float time2, float d, float v);
void maxIndex(int array[], int LengthX, int* MaxValue, int* Index);
int serialListen();
bool serialSend(float angle1, float angle2);


int serialListen(){
//waits for line to send command, either pingHappened or return angles
}

bool serialSend(float angle1, float angle2){
//sends the angle data down the RS485 line
}

float getTemp()
{
