Light Intensity Sensor ====================== .. image:: Images/lightintensitysensor.jpg :align: center Light Intensity sensor (photoresistor) generates an output voltage, proportional to the light intensity detected. As light intensity increases, energy increases as well, resulting in bound electrons breaking free and conducting electricity, decreasing resistance, and thus creating a higher voltage. .. warning:: Before proceeding with this sensor, you will need to learn about the :ref:`mcpadc`. Connecting the Sensor ---------------------- Light Intensity sensor returns analog signals. Since the Raspberry Pi can only read digital signals, the :ref:`mcpadc` will be used as ADC(analog-to-digital converter). Each pin of the MCP3008 needs to be connected to its respective pin on the Raspberry Pi, according to the below image. .. image:: Circuits/lightintensitysensor.jpg :align: center Python Program to Read Light Intensity --------------------------------------- .. literalinclude:: Code/lightintensitysensor.py :linenos: :language: python