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
Laser head sensor module (KY-008)
Working voltage: 5V
Size: 15*24mm
Light source wavelength: 650 nm
Weight: 2.2g
Module Wiring
Pin 1 is power supply + VCC
2 pins are output OUT (S)
3 pins are power supply - GND
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.
/*
【Arduino】108种传感器模块系列实验(21)
实验二十一:激光头传感器模块(KY-008)
源代码
*/
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
【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);
}
}
Arduino experiment scene diagram