PT550 光敏二极管光线传感器
来自Jack's Lab
1 概述
PT550 环保型光敏二极管的光线传感器,用来对环境光线的强度进行检测
- 模拟输出电压:0 - 5V
- 适用电源电压:3 - 5V
2 示例代码
void setup() { Serial.begin(9600); // open serial port, set the baud rate to 9600 bps } void loop() { int val; val = analogRead(2); //connect grayscale sensor to Analog 2 Serial.println(val,DEC);//print the value to serial delay(100); }
3 参考
- http://www.dfrobot.com/image/data/DFR0026/XYC-PT5I850AC-A4xls.pdf
- http://wiki.dfrobot.com.cn/index.php/(SKU:DFR0026)%E6%A8%A1%E6%8B%9F%E7%8E%AF%E5%A2%83%E5%85%89%E7%BA%BF%E4%BC%A0%E6%84%9F%E5%99%A8