Project tutorial
A Device Which Help Us To Maintain Social Distancing

A Device Which Help Us To Maintain Social Distancing

Hi, my name is Rohan Barnwal and in this project I have taught you that how you can build a device which help you to maintain social distanc

  • 3,363 views
  • 4 comments
  • 10 respects

Components and supplies

Apps and online services

About this project

Social Distancing Helper or Social Distancing Belt

Hi, Everyone my name is Rohan Barnwal and I have created a project Which help us to maintain social distancing as we all know that the whole world is fighting with COVID 19 and our doctors are saying that maintain social distance of at least 1 m So, I have decided that why we should make a project help us to maintain social distancing. So in this project, I have used Ultrasonic Sensor which help us to maintain the distance of 1m. If any person comes within the range of 1m then the buzzer starts beeping

Here's my Video Link To Create this:-

How to make a device which can help you to maintain social distancing

It total costs:- ₹415 or approx $6

Code

Social Distancing DeviceArduino
Just Take This Code And Paste It To Your Arduino IDE
//Created By Rohan Barnwal
// defines pins numbers
const int trigPin = 2;
const int echoPin = 3;
// defines variables
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600); // Starts the serial communication
pinMode(11,OUTPUT);
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
if(distance<100){
  digitalWrite(11,HIGH);
}
else{
  digitalWrite(11,LOW);
}
}

Schematics

Connection
Capture xz5lulhu3w

Comments

Similar projects you might like

Buzzer Alarm System With Help Of Arduino

by Team ONYX

  • 62,118 views
  • 10 comments
  • 38 respects

Arduino Uno + Electrical Device (Bulb) + Android Phone

Project tutorial by Stephen Simon

  • 10,703 views
  • 9 comments
  • 40 respects

Arduino Bluetooth Robot for Android Device

Project showcase by aip06

  • 4,926 views
  • 2 comments
  • 19 respects

LED Matrix Display Badge

Project tutorial by Team FabLabAQ

  • 4,184 views
  • 3 comments
  • 21 respects

Safe City: A Device to Keep You Safe

Project tutorial by Patel Darshil

  • 9,871 views
  • 1 comment
  • 26 respects

Carfox: A Device to Find Them All

Project tutorial by Luis Roda Sánchez

  • 8,265 views
  • 3 comments
  • 29 respects
Add projectSign up / Login