DIYmall Laser Transmitter Receiver Module Buzzer with Arduino

What you need:
1PCS Arduino UNO
1PCS  Laser Transmitter Sensor
1PCS  Laser Receiver  Sensor
1PCS Buzzer
A Few PCS Female to Male Dupont Cable

Connection:
Laser Transmitter Sensor                Arduino UNO
S                                                                       D12
+                                                                       5V
–                                                                        GND

Laser Receiver  Sensor                Arduino UNO
S                                                                       D2
+                                                                       5V
–                                                                        GND

Buzzer                                                   Arduino UNO
–                                                                     GND
+                                                                      D8

Code:

int Active = 8;
int LaserSensor = 2;
int SensorReading = HIGH;
int Laser = 12;

void setup() {
pinMode(Active, OUTPUT);
pinMode(Laser, OUTPUT);
pinMode(LaserSensor, INPUT);

}
void loop() {
digitalWrite(Laser, HIGH);
delay(50);
SensorReading = digitalRead(LaserSensor);
if(SensorReading == (HIGH)

{
digitalWrite(Active, HIGH);
}
else
{
digitalWrite(Active, LOW);
}
}

Result:  
When there is an obstacle, the buzzer will turn on
When there is no obstacle, the buzzer will turn off

Where to buy:
Amazon Link:
https://www.amazon.com/dp/B07FQ6696X

https://www.amazon.com/dp/B07H95679S

Website Link:

Alibaba Link:

Aliexpress Link:

eBay Link:

 

Any question please email sales@diymalls.com

USBASP

Driver link: https://zadig.akeo.ie/

Video link: https://youtu.be/54cAKaolOQY

Connection like below, then connect it to the PC USB interface:
You can use 2.54mm Pitch Jumper Cap or DuPont Cable

Install driver: Driver name is Zadig
Options-choose List All Devices

Choose USBasp,  Driver libsubK(v3.0.7.0) , you need click the drop-down menu to choose the correct driver

 

After install the driver successfully,  you can open device manger and see the device as below:

 

Open AVRDUDESS and setting as below:
Programmer: Uptanium USBASP
Port: usb
MCU: ATmega8
Flash: choose hex you want to use
Click Detect, then click Go
Please pay attention about the print information in the window

 

It will show writing …   Reading…, once done it will show avrdude.exe done.  You can check the details as below:

Any question please contact via sales@diymalls.com
Website: www.diymalls.com

How to Flash STM32F103CBT6

Connection: LORAM3 and ST-link
GND -GND
3V3-3V3
DIO-DIO
CLK-CLK

Open software STM32 ST-LINK Utility, click target-connect

Then click target-program

Then choose flash file and click start