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.

Jan 17, 2022

14816 views

1 respects

Devices & Components

1

Arduino Uno Rev3

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

Hardware & Tools

1

Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires

Software & Tools

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

blackpanda856

0 Followers

0 Projects

0