Strange compiler error

Yes, that round command is not needed. It returns whole numbers regardless.

I'd like some sort of way to filter out spurious readings from the sonic sensors. Averaging might not be good, as the odd time a really high reading comes in that is in the 1000 inch range, when it should be reading around 100 inches to the wall.

How could I take 3 readings and only use the median reading?