Photosensor for quality control, Proximity sensor for object detection