“激光发射”的版本间的差异
来自Labplus盛思维基百科
Jiangzhaohui(讨论 | 贡献) (创建页面,内容为“=== Arduino示例 === <pre style="color:blue"> int buttonPin =2; int laserPin=3; int val; void setup() { // put your setup code here, to run once: Serial.…”) |
Tangliufeng(讨论 | 贡献) |
||
第1行: | 第1行: | ||
− | === Arduino示例 === | + | [[文件:黑色传感器最终版12.20-09.png|350px|缩略图|右]] |
+ | == 概述 == | ||
+ | 内置激光发射头,高电平开启激光器,低电平则否 | ||
+ | |||
+ | == 技术参数 == | ||
+ | * 工作电压: VCC 3.3V -5V | ||
+ | * 发射功率:150mW | ||
+ | * 激光波长:650nm(红色) | ||
+ | * 出光功率:<5mW | ||
+ | * 光点大小:15米处光直径:<φ15mm | ||
+ | * 模块尺寸:24x46x7.5mm | ||
+ | |||
+ | == 引脚定义 == | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | | <small>VCC</small> || <small>电源</small> | ||
+ | |- | ||
+ | | <small>NC</small> || <small>空脚</small> | ||
+ | |- | ||
+ | | <small>DI</small> || <small>数字输入</small> | ||
+ | |- | ||
+ | | <small>GND</small> || <small>地</small> | ||
+ | |} | ||
+ | |||
+ | == 使用教程 == | ||
+ | === <small>Arduino示例</small> === | ||
<pre style="color:blue"> | <pre style="color:blue"> | ||
int buttonPin =2; | int buttonPin =2; | ||
第12行: | 第37行: | ||
void loop() { | void loop() { | ||
− | val=digitalRead(buttonPin); | + | val=digitalRead(buttonPin); |
Serial.print(val); | Serial.print(val); | ||
if(val==HIGH) | if(val==HIGH) |
2018年1月8日 (一) 14:41的版本
概述
内置激光发射头,高电平开启激光器,低电平则否
技术参数
- 工作电压: VCC 3.3V -5V
- 发射功率:150mW
- 激光波长:650nm(红色)
- 出光功率:<5mW
- 光点大小:15米处光直径:<φ15mm
- 模块尺寸:24x46x7.5mm
引脚定义
VCC | 电源 |
NC | 空脚 |
DI | 数字输入 |
GND | 地 |
使用教程
Arduino示例
int buttonPin =2; int laserPin=3; int val; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(buttonPin,INPUT); pinMode(laserPin,OUTPUT); } void loop() { val=digitalRead(buttonPin); Serial.print(val); if(val==HIGH) { digitalWrite(laserPin,HIGH); } else { digitalWrite(laserPin,LOW); } }