   return;
 }
 
+//sends value to master Arduino
 void send(unsigned long value){
-  //send value to master arduino
   return;
 }
 

    handleInvalid(distance);
  }
  
  Serial.print(distance); //blauw
  Serial.print(" ");
  Serial.print(validAverage);
  Serial.print(" ");
  Serial.print(sensor.convert_cm(distance) * 60);
  Serial.print(" ");
  Serial.print(sensor.convert_cm(validAverage) * 60);
  Serial.println();

  /*
  Serial.print(sensor.convert_cm(distance) * 10);
  Serial.print(" ");
  Serial.println(sensor.convert_cm(validAverage) * 10); 
  */

  delay(30);
}

unsigned int measure(){
  return sensor.ping();
}


  return round(newAverage);
}

void sensorCheck() {
  validAverage = measure(); //Gets the first average for use in exponential moving average calculation.
  if (validAverage == 0) {
    //Sensor isn't working. Action required.
  }
