Optical sensors ... light levels rise above or fall below a prescribed level, or a highly sensitive device for detecting single photons. Most optical sensors produce an electrical output.