DFRobot_Grayscale_Sensor_(SKU_DFR0022) - jimaobian/DFRobotWiki GitHub Wiki

Introduction

DFRobot Grayscale Sensor the dfrobot grayscale sensor is an analog sensor. it is a special sensor with arduino expansion boards. the gray-scale sensor interface uses ph 2.0 socket. the power supply needs the same controller, typically for 3.3v or 5V.

Specification

  • Analog sensors
  • Uses PH 2.0 socket
  • Special sensor with Arduino expansion boards

Pin Definition

The definition of gray-scale 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);
}

image:nextredirectltr.pngGo shopping dfrobot grayscale sensor (sku:dfr0022)

category: Product_Manual category: DFR_Series category: Sensors category:source category:Diagram