 		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()
 {

	int Signal3[SignalReadLength];
	float Volocity;


	float Temp = getTemp();
	Volocity=1.402385*1000 + 5.038813*Temp - 5.799136/100*Temp*Temp + 3.287156/10000*Temp*Temp*Temp; //sound speed in water under atm pressure



	if (digitalRead(SignalFlagPin) == HIGH) //is the SetupPin 'HIGH' cover the whole signal or just mark the start point?
	{

		for(int i=0; i<SignalReadLength; i++) //sampling rate need to be measured
		{

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