DFRobot Ambient Light Sensor (SKU:DFR0026 )

From Robot Wiki
Jump to: navigation, search

Introduction

DFRobot Ambient Light Sensor

The DFRobot Ambient Light Sensor works with Cds Photoresistor and allows you to have a DC Voltage output depending on the brightness of lights. Dark has a low value. The sensor can be used to detect the intensity of ambient light.

Specification

  • Detects ambient light density
  • Works with Cds Photoresistor
  • Analog voltage output: 0 to 5 Vdc
  • Suitable supply voltage: +3 to 5Vdc
  • Interface with microcontrollers and logic circuits
  • Standard 3-pin PCB connector
  • Analog sensors
  • Uses PH 2.0 socket
  • Special sensor with Arduino expansion boards

Pin Definition

The definition of ambient light sensor pin is

  1. Signal Output
  2. GND
  3. Power
Analog Sensor Pin Definition

Connection Diagram

Analog sensor 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);
}





Nextredirectltr.pngGo Shopping DFRobot Ambient Light Sensor (SKU:DFR0026 )