PT550 光敏二极管光线传感器
来自Jack's Lab
(版本间的差异)
(以“ * 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%8...”为内容创建页面) |
(→示例代码) |
||
| (未显示1个用户的6个中间版本) | |||
| 第1行: | 第1行: | ||
| + | == 概述 == | ||
| + | |||
| + | PT550 环保型光敏二极管的光线传感器,用来对环境光线的强度进行检测 | ||
| + | |||
| + | * 模拟输出电压:0 - 5V | ||
| + | * 适用电源电压:3 - 5V | ||
| + | |||
| + | <br><br> | ||
| + | |||
| + | == 示例代码 == | ||
| + | |||
| + | <source lang=cpp> | ||
| + | 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); | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | <br><br> | ||
| + | |||
| + | == 参考 == | ||
* http://www.dfrobot.com/image/data/DFR0026/XYC-PT5I850AC-A4xls.pdf | * 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 | * 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 | ||
| + | |||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
| + | <br><br> | ||
2015年7月17日 (五) 17:29的最后版本
[编辑] 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