 	caAverage = caTotal / numCaReadings;
 	mhAverage = mhTotal / numMhReadings;  
 	tmAverage = tmTotal / numTmReadings;
-	pvAverage = pvTotal / numPvReadings;
         
 // Calculate steering angle (-95 to 95, because the pot has 190 degrees of sweep after pulley ratio)
         // Pot centered on steering angle of 0
-        steerAngle = pvAverage-95;
+        steerAngle = (potVal-95);
 
 // Calculate max speed
         if (maxSpeed<(GPS.speed*(1.15078+speedoCal))){

	caReadings[caReadIndex] = kalRoll; //camber;
	mhReadings[mhReadIndex] = magHeading;  
	tmReadings[tmReadIndex] = temperature;
	pvReadings[pvReadIndex] = potVal;
	gaTotal = gaTotal + gaReadings[gaReadIndex];
	baTotal = baTotal + baReadings[baReadIndex];
	gdTotal = gdTotal + gdReadings[gdReadIndex];
	caTotal = caTotal + caReadings[caReadIndex];
	mhTotal = mhTotal + mhReadings[mhReadIndex];  
	tmTotal = tmTotal + tmReadings[tmReadIndex];
	pvTotal = pvTotal + pvReadings[pvReadIndex];
        // Advance to the next position in the array:
	gaReadIndex = gaReadIndex + 1;
	baReadIndex = baReadIndex + 1;

	const int numCaReadings = 3;
	const int numMhReadings = 3;
	const int numTmReadings = 9;
	int gaReadings[numGaReadings];      // the readings from the GPS.angle
	int baReadings[numBaReadings];      // the readings from the bmpAltitude
	int gdReadings[numGdReadings];      // the readings from the grade
	int caReadings[numCaReadings];      // the readings from the camber
	int mhReadings[numMhReadings];      // the readings from the magHeading
	int tmReadings[numTmReadings];      // the readings from the temperature
	int gaReadIndex = 0;              // the index of the current reading
	int baReadIndex = 0;              // the index of the current reading
	int gdReadIndex = 0;              // the index of the current reading
	int caReadIndex = 0;              // the index of the current reading
	int mhReadIndex = 0;              // the index of the current reading
	int tmReadIndex = 0;              // the index of the current reading
	int gaTotal = 0;                  // the running total
	int baTotal = 0;                  // the running total
	int gdTotal = 0;                  // the running total
	int caTotal = 0;                  // the running total
	int mhTotal = 0;                  // the running total
	int tmTotal = 0;                  // the running total
	int gaAverage = 0;                // the average
	int baAverage = 0;                // the average
	int gdAverage = 0;                // the average
	int caAverage = 0;                // the average
	int mhAverage = 0;                // the average
	int tmAverage = 0;                // the average

// Accel calibration for calculating G Force - using simple calibration method       
	int xRawMin = -121.85;
