How A Light Sensor Works