Controlling LED's Using Ultrasonic Distance Sensor
Turns the 2 LED's on and off by calculating the distance of the object from the Ultrasonic Sensor.
Components and supplies
1
Breadboard (generic)
1
5 mm LED: Red
1
Ultrasonic Sensor - HC-SR04 (Generic)
1
Male/Female Jumper Wires
2
Resistor 1k ohm
1
5 mm LED: Green
1
Arduino UNO
Tools and machines
1
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Apps and platforms
1
Arduino IDE
Project description
Code
Code
c_cpp
This is the code of this project. Copy paste this code to your Arduino IDE.
Downloadable files
Circuit Diagram
This is the Circuit Diagram of this project. Assemble your project by following this circuit diagram.
Circuit Diagram
Circuit Diagram
This is the Circuit Diagram of this project. Assemble your project by following this circuit diagram.
Circuit Diagram
Comments
Only logged in users can leave comments