Photosensor for motion detection, Proximity sensor for object detection