Proximity sensor in material handling