Sensor-based sorting