Arduino Project
Arduino LED Chaser with Push Buttons V3
Kit purchase
Looking for parts? Check out our all-in-one kits below — packed with components, beginner-friendly guides, and tons of fun.

Course Introduction
In this lesson, you will use Arduino together with two Ultrasonic Sensor Modules and a row of LEDs to create an automatic directional light-flow effect.
When the left sensor detects an object, the LEDs light up in a forward flowing pattern.
When the right sensor is triggered, the LEDs flow in the opposite direction.
Each sensor controls one direction of the animation, allowing the LEDs to respond dynamically based on which side an obstacle is detected.
Note
If this is your first time working with an Arduino project, we recommend downloading and reviewing the basic materials first.
1.1 Install Arduino IDE(Important)
1.2 Introduction of Arduino IDE
Wiring

Common Connections:
LED
Connect the LEDs cathode to the negative power bus on the breadboard, and the LEDs anode to 1kΩ resistor then to 5 to 10 on the Arduino.
Ultrasonic Sensor Module Right
Trig: Connect to 11 on the Arduino.
Echo: Connect to 12 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.
Ultrasonic Sensor Module Left
Trig: Connect to 3 on the Arduino.
Echo: Connect to 4 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.
Writing the Code
Note
You can copy this code into Arduino IDE.
Don’t forget to select the board(Arduino UNO R4 Minima) and the correct port before clicking the Upload button.
