 
 //converts the reading into a cm value representing how far away the nearest
 // obj is 
-float convert(float val) {
-  float res;
-  res = (val / 147) * 2.54;
-  return res;
-}
+//double convert(double val) {
+  //double res;
+  //res = (val / 147) * 2.54;
+  //return res;
+//}
 
 const unsigned int numReadings = 10; // number of readings per second 
 

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

  

  Serial.begin(9600);
}


// res vars
double reading30,reading70,reading110,reading150;
double sum30, sum70, sum110, sum150;
double avg30, avg70, avg110, avg150;

void loop() {

  
  //set up the pins for input
  pinMode(pin30, INPUT);
