“激光发射”的版本间的差异
来自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.…”) |
(→使用教程) |
||
(未显示3个用户的11个中间版本) | |||
第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> | ||
+ | |} | ||
+ | |||
+ | == 使用教程 == | ||
+ | === <font size="3">掌控板</font> === | ||
+ | {| | ||
+ | |- | ||
+ | | [[文件:激光2.png |900px|居中|无框]] | ||
+ | |} | ||
+ | |||
+ | === <font size="3">Arduino示例</font> === | ||
<pre style="color:blue"> | <pre style="color:blue"> | ||
+ | //程序功能:按键按下,发射激光;按键松开,激光关闭// | ||
int buttonPin =2; | int buttonPin =2; | ||
int laserPin=3; | int laserPin=3; | ||
第12行: | 第44行: | ||
void loop() { | void loop() { | ||
− | val=digitalRead(buttonPin); | + | val=digitalRead(buttonPin); |
Serial.print(val); | Serial.print(val); | ||
if(val==HIGH) | if(val==HIGH) | ||
第24行: | 第56行: | ||
} | } | ||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | === <font size="3">图形化示例</font> === | ||
+ | {| | ||
+ | |- | ||
+ | |程序功能:当按键被按下时,激光发射,否则,激光关闭 | ||
+ | |- | ||
+ | |[[文件:红外激光.png|900px|无框|左]] | ||
+ | |} | ||
+ | |||
+ | == 版本历史记录 == | ||
+ | |||
+ | {| border="1" cellspacing="0" align="left" cellpadding="0" width="60%" style="text-align:center;" | ||
+ | |- style="text-align:center;background-color:#6fa8dc;color:#fffff;" | ||
+ | !width="10%"|Version !!width="15%"| Date !! Note <small>[+]新增[-]删除[^]修复</small> | ||
+ | |- | ||
+ | | V2.0 || || style="text-align:left"| | ||
+ | |} |
2020年6月30日 (二) 16:54的最新版本
概述
内置激光发射头,高电平开启激光器,低电平则否
技术参数
- 工作电压: 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); } }
图形化示例
程序功能:当按键被按下时,激光发射,否则,激光关闭 |
版本历史记录
Version | Date | Note [+]新增[-]删除[^]修复 |
---|---|---|
V2.0 |