The calibration loop now uses the average of an array of ten samples.