   Serial.begin(9600);
 }
 
+
+// res vars
+double reading30,reading70,reading110,reading150;
+double sum30, sum70, sum110, sum150;
+double avg30, avg70, avg110, avg150;
+
 void loop() {
-  // res vars
-  float reading30[numReadings],reading70[numReadings],reading110[numReadings],reading150[numReadings];
-  float res30[numReadings],res70[numReadings],res110[numReadings],res150[numReadings];
-  float sum30, sum70, sum110, sum150;
-  float avg30, avg70, avg110, avg150;
+
   
   //set up the pins for input
   pinMode(pin30, INPUT);

   Serial.print(avg110);
   Serial.print(",");
   Serial.println(avg150);
}

  

  //record the readings and then average them. 
  for (int i = 0; i < numReadings; i++) {
    //take the readings
    reading30 = pulseIn(pin30,HIGH);
    reading70 = pulseIn(pin70,HIGH);
    reading110 = pulseIn(pin110,HIGH);
    reading150 = pulseIn(pin150,HIGH);
    //convert the readings
    sum30 += ((reading30 / 147) * 2.54);
    sum70 += ((reading70 / 147) * 2.54);
    sum110 += ((reading110 / 147) * 2.54);
    sum150 += ((reading150 / 147) * 2.54);
    // wait to take next reading number of readings
    delay(1000/numReadings);  
   }
   
   // Avg the readings
