How to Make Social Distancing Device

Introduction: How to Make Social Distancing Device

About: Hello, I'm a junior creator and I'm 15 years old, I also have a YouTube channel named arduino maker

HELLO THERE,

In this tutorial I am going to shiw that how can you make a social distancing device which can help you maintaing social distance and can protect you from corona

If you like this tutorial then consider subscribing my youtube channel THE ARDUINO MAKER

Supplies

Step 1: CONNECTIONS

After getting all supplies now you can start connecting all the components in the right way accorging to the circuit diagram given above

Step 2: ARRANGING COMPONENTS

Now after completing the above steps you can start glueing components in the right place as shown in the above pictures

you can also do it in your way i liked it in this way

Step 3: PROGRAMING

Now its time to program the board with the code given below

int const trigPin = 4;
int const echoPin = 3; int const buzzPin = 2; void setup() { pinMode(trigPin, OUTPUT); // trig pin will have pulses output pinMode(echoPin, INPUT); // echo pin should be input to get pulse width pinMode(buzzPin, OUTPUT); // buzz pin is output to control buzzer } void loop() { // Duration will be the input pulse width and distance will be the distance to the obstacle in centimeters int duration, distance; // Output pulse with 1ms width on trigPin digitalWrite(trigPin, HIGH); delay(1); digitalWrite(trigPin, LOW); // Measure the pulse input in echo pin duration = pulseIn(echoPin, HIGH); // Distance is half the duration devided by 29.1 (from datasheet) distance = (duration/2) / 29.1; // if distance less than 0.5 meter and more than 0 (0 or less means over range) if (distance <= 100 && distance >= 0) { // Buzz digitalWrite(buzzPin, HIGH); } else { // Don't buzz digitalWrite(buzzPin, LOW); } // Waiting 60 ms won't hurt any one delay(60); }


Step 4: ENJOY!

YEH!!!!!

YOU HAVE MADE IT SO NOW PROMOTE SOCIAL ISTANCING USING THIS DEVICE AND DON'T FORGET TO LIKE THIS PAGE AND DO SUBSCRIBE MY CHANNEL

Be the First to Share

    Recommendations

    • Pets Challenge

      Pets Challenge
    • Stone, Concrete, Cement Challenge

      Stone, Concrete, Cement Challenge
    • Backyard Contest

      Backyard Contest

    3 Comments

    1
    Bijaylaxmi ahir
    Bijaylaxmi ahir

    Question 1 year ago on Step 1

    Good morning sir ,
    How the circuit works? Please explain.

    0
    ARDUINO MAKER
    ARDUINO MAKER

    Reply 11 months ago

    message me on instagram @the.arduino.maker