DESCRIPTION
A Photoresistor Light Sensor Module for Arduino is a device that measures the amount of light in the environment and provides an output signal that can be used to control other devices. The module consists of a photoresistor, which is a type of resistor that changes resistance based on the amount of light it receives, and a circuit that converts the photoresistor’s resistance into a signal that the Arduino can understand. The user can program the Arduino to perform specific tasks based on the light level measured by the photoresistor. This opens up a wide range of possibilities for projects, such as controlling lights or motors, or creating light-sensitive displays. The Photoresistor Light Sensor Module is easy to use, compact, and affordable, making it a popular choice for Arduino enthusiasts and hobbyists.
FEATURES
- Color: Blue + Black
- Material: Plastic + Copper + PCB
- Detect brightness and light intensity surrounding
- Sensitivity adjustable (Blue digital potentiometer adjustment)
- Working voltage: 3.3V~5V
- Output: Analog voltage output, digital switch output (0, 1)
- With installation holes, easy to use
- Small boars size: 3cm x 1.6cm
- Power indicator: Red
- Digital switch output indicator: Green
- Uses LM393 chip comparator, work stability
- 4-wire connection
- VCC: External 3.3V~5V
- GND: External GND
- DO: Small board digital output port (0, 1)
- AO: Small board analog output port
- Great for DIY projectÂ
Connection
CodeÂ
int photocellPin = A0; // select the input pin for the photoresistor
int val = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);//Set the baudrate to 9600,make sure it's same as your software settings
// pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
pinMode(photocellPin, INPUT); // declare the ledPin as an OUTPUT
}
void loop() {
val = analogRead(photocellPin); // read the value from the sensor
Serial.println(val); //The serial will print the light value
}