Distancing Box

by zzzx0618 in Circuits > Arduino

142 Views, 1 Favorites, 0 Comments

Distancing Box

1.jpg

Different parameters can be set according to different requirements, so that within a certain distance, the light of a specific color.

The function of this project is to light a red light with an alarm when the distance is less than 10cm to remind the distance is too close. Blue light at 10 to 20 cm; Green light at more than 20cm.

Downloads

Material Appliances

Aduino breadboard;

Several Dupont lines;

The RGB light;

Ultrasonic sensor;

Buzzer;

3×110-ohm resistors;

A number of resistance;

Some of the wooden board;

Connections

图片1.png

RedPin -- 7

GreenPin -- 6;

BluePin -- 5;

Buzzer -- 12

Ucc -- 5V

Trig -- 2

Echa -- 3

Code

Downloads