Project showcase
Social Distance Detector

Social Distance Detector

Social distancing is a new way of life globally. Clip this device on ur belt and maintain social distancing.

  • 14,350 views
  • 9 comments
  • 36 respects

Components and supplies

Necessary tools and machines

arduino ide

About this project

Social distancing is a new way of life globally. Clip this device on ur belt and maintain social distancing. This device will buzz an alarm when you are less than 6 feet away from any humans. A bright LED glows when the alarm beeps.

Code

Social Distance DetectorC/C++
const int trigPin = 9;
const int echoPin = 10;
long duration;
int distanceCm, distanceInch;
void setup()
{
Serial.begin(9600); 
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm= duration*0.034/2;
distanceInch = duration*0.0133/2;
Serial.println("Distance: ");
Serial.println(distanceCm);

if(distanceCm < 100)
{
  digitalWrite(11,HIGH);
  digitalWrite(12,HIGH);
}
else 
{
  digitalWrite(11,LOW);
  digitalWrite(12,LOW);
}
}

Comments

Similar projects you might like

COVID-19 Ultrasonic Distance Warning Tool

Project tutorial by DL1EKM

  • 9,394 views
  • 1 comment
  • 20 respects

Arduino EMF Detector A.K.A Ghost Detector

Project showcase by Patel Darshil

  • 20,943 views
  • 10 comments
  • 26 respects

Motion Direction Detector

Project showcase by sergioluz

  • 6,544 views
  • 2 comments
  • 9 respects

COVID-19 Simple Friendly Social Distance Robot Watchzi

Project tutorial by draakje156

  • 6,126 views
  • 0 comments
  • 6 respects

Social Distancing Reminder – Coronavirus

Project tutorial by arcaegecengiz

  • 17,907 views
  • 7 comments
  • 21 respects

Proximity Alarm Distance Meter

by Hassan Shettima Lawan

  • 7,412 views
  • 2 comments
  • 25 respects
Add projectSign up / Login