The biggest problem we face with this circuit is the fact that the pi doesn t have any analogue pins.
Lm393 light sensor module raspberry pi.
The lm393 is a simple photo resistor light sensor that has both analog and digital outputs.
With fixed bolt hole for easy.
Digital switching outputs 0 and 1 5.
This light sensor module has 4 wires.
Lm393 light sensor module 3 3 5v input light sensor for arduino raspberry pi 1 offer from 7 00.
If you re new to python i recommend taking a quick crash course on the basics of python.
The brightness of surrounding environment and the light intensity can be detected compare with the photoresistor directivity is relatively good can perceive the fixed direction of the light source 2 sensitivity adjustable the blue digital potentiometer adjustment figure 3.
Connect breadboard to raspberry pi using figure 3 as a reference connect the gpio pins on raspberry pi to the breadboard using three female to male jumper wires.
Light level detection the brightness of the light sensor is directional only inductive sensor in front of the light source used to find light better.
The light sensor code.
In the following example we will use the analog output to measure light level.
We can only use digital output directly on raspberry pi because raspberry pi doesn t come with any analog input pin.
Running the program to use the light meter load and run the program 08 light meter py in mu.
Only 7 left in stock order soon.
The digital pin is the digital output while the analog pin is the analog output.
Vcc gnd digital analog.
This fits your.
Lm393 light sensor module 3 3 5v input light sensor for arduino raspberry pi brand.
Lm393 digital light sensor module 4 pin this light sensor module combines both the ky 018and 3 pin design of lm393 to create a universal module that can act as a digital switch if connected to do pin or as an analog sensor if connected to ao analog output.
The digital output has a trim potentiometer that can be used to set a trigger light level.
Connect the module to the raspberry pi.
Lm393 light sensor module 3 3 5v input light sensor for arduino raspberry pi top obtain the spe.