takes multiple readings for obstacle detection