[Diao Ye learns programming] Arduino hands-on (21) - several experiments on 650nm5mw red light point laser head module

insert image description here

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensors and modules on hand, according to the concept of true knowledge (must be done by hands), for the purpose of learning and communication, I am going to try and do experiments one by one here, and will record them whether they are successful or not—Xiao Xiao The progress or problems that cannot be solved, I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphic programming)
experiment 21: laser head sensor module (KY-008) 3V5V laser head red laser tube infrared positioning point semiconductor device 6MM outer diameter laser two Grade tube

insert image description here

Laser head sensor module (KY-008)

Working voltage: 5V

Size: 15*24mm

Light source wavelength: 650 nm

Weight: 2.2g

insert image description here

insert image description here

Module Wiring

Pin 1 is power supply + VCC

2 pins are output OUT (S)

3 pins are power supply - GND

insert image description here
insert image description here
Special Note: This laser head emits a red laser beam, that is, a parallel beam. A faint red line can only be seen under the premise of fog or other media, and a red dot is usually seen.

Special attention: do not point into people's eyes.
insert image description here

/*

【Arduino】108种传感器模块系列实验(21)

  实验二十一:激光头传感器模块(KY-008)

 源代码

*/

void setup() 

{                

 pinMode(13, OUTPUT); 

}

 

void loop() 

{

  digitalWrite(13, HIGH);   

  delay(1000);              

  digitalWrite(13, LOW);    

  delay(1000);              

}


insert image description here

【Arduino】108种传感器模块系列实验(21)

  实验二十一:激光头传感器模块(KY-008)

项目:激光绊线

*/

 

const int photo = 7;

const int LED = 9;

 

void setup() {

  pinMode(LED, OUTPUT);

  digitalWrite(LED, LOW);

 

  pinMode(photo, INPUT_PULLUP);

}

 

void loop() {

 

  if(digitalRead(photo)==HIGH){

    digitalWrite(LED, HIGH);

 

  }else{

    digitalWrite(LED, LOW);

  }

 

}

insert image description here
laser tripwire
Arduino experiment scene diagram
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132501422