DFRobot_Grayscale_Sensor_(SKU_DFR0022) - jimaobian/DFRobotWiki GitHub Wiki
Introduction
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
- Signal Output
- GND
- Power
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);
}
shopping dfrobot grayscale sensor (sku:dfr0022)
category: Product_Manual category: DFR_Series category: Sensors category:source category:Diagram