Introduction
Here comes DFRobot's new Analog Ambient Light Sensor. Brand new design and much more convenient to use.This module helps you to detect the light density and reflect the analog voltage signal back to Arduino controller. You can set the threshold of voltage level to trigger motors, relays or other actuators.
Specification
- Supply Voltage: 3.3V to 5V
- Interface: Analog
- Size: 22x30mm
- Pins Description:
- Old Version: 1--Output; 2--GND; 3--VCC
- New Version: 1--Output; 2--VCC; 3--GND
- Operating Temperature: 0-70°C
Note: the product is NOT waterproof and dustproof; the detection accuracy will be affected by the light brightness of the environment and light reflectance of the material the sensor detects.
Connection Diagram
Sample Code
void setup()
{
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0); //connect grayscale sensor to Analog 0
Serial.println(val,DEC);//print the value to serial
delay(100);
}
More Documents
Version History: Analog Grayscale Sensor(SKU:DFR0022)