激光发射

来自Labplus盛思维基百科
Tangliufeng讨论 | 贡献2018年5月2日 (三) 11:41的版本
跳转至: 导航搜索
黑色传感器最终版12.20-09.png

概述

内置激光发射头,高电平开启激光器,低电平则否

技术参数

  • 工作电压: 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);
   }
}


图形化示例

程序功能:当按键被按下时,激光发射,否则,激光关闭
红外激光.png

版本历史记录

Version Date Note [+]新增[-]删除[^]修复
V2.0