This video explain the complete circuit diagram that how I made it. If you want to learn about the code as well then check my next video where I explained the code as well.
Connections:
The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo. The Ground and the VCC pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board respectively and the trig and echo pins to any Digital I/O pin on the Arduino Board.
The HC-SR04 sensor attach to the Breadboard
The Sensor VCC connect to +ve terminal of breadboard
The Sensor GND connect to the -ve terminal of breadboard
The Sensor Trig connect to the Arduino Board Digital I/O 3
The Sensor Echo connect to the Arduino Board Digital I/O 2
Buzzer and LED
The Buzzer attach to the Breadboard
The Buzzer long leg (+) connect to the Arduino Board Digital I/O 6
The Buzzer short leg (-) connect to the breadboard -ve terminal
The LED attach to the Breadboard
The Resistor connect to the RED LED long leg (+)
The Resistor connect to the GREEN LED long leg (+)
The Resistor other leg (green) connect to the Arduino Digital I/O 4
The Resistor other leg (green) connect to the Arduino Digital I/O 5
The LED short leg (-) for both LED's connect to the Arduino Board GND
Code: https://drive.google.com/file/d/1v_Ss...
Connections:
The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo. The Ground and the VCC pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board respectively and the trig and echo pins to any Digital I/O pin on the Arduino Board.
The HC-SR04 sensor attach to the Breadboard
The Sensor VCC connect to +ve terminal of breadboard
The Sensor GND connect to the -ve terminal of breadboard
The Sensor Trig connect to the Arduino Board Digital I/O 3
The Sensor Echo connect to the Arduino Board Digital I/O 2
Buzzer and LED
The Buzzer attach to the Breadboard
The Buzzer long leg (+) connect to the Arduino Board Digital I/O 6
The Buzzer short leg (-) connect to the breadboard -ve terminal
The LED attach to the Breadboard
The Resistor connect to the RED LED long leg (+)
The Resistor connect to the GREEN LED long leg (+)
The Resistor other leg (green) connect to the Arduino Digital I/O 4
The Resistor other leg (green) connect to the Arduino Digital I/O 5
The LED short leg (-) for both LED's connect to the Arduino Board GND
Tinkercad link:
https://www.tinkercad.com/things/132W...
Code:
https://drive.google.com/file/d/1v_Ss...