Things used in this project

Hardware components:
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×5
5 Ultrasonic sensor
×5
Perfboard
×5
Vibrating motor
×5
Adafruit industries ada1536 image
Buzzer
×5
Kingbright wp7113srd d image
5 mm LED: Red
×5
E switch eg1218 image 75px
Slide Switch
×5
Pppc081lfbn rc sml
Female Header 8 Position 1 Row (0.1")
×2
Te connectivity 4 103741 0 image 75px
Male Header 40 Position 1 Row (0.1")
×2
11026 02
Jumper wires (generic)
×4
Power bank
×1
Gus 1719
C.H.I.P. Approved 3.7 V LiPo Battery
×1
Some elastics and stickers
(to make it as a band for wearing)
×1
Software apps and online services:
Ide web
Arduino IDE
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)
Hy gluegun
Hot glue gun (generic)

Schematics

Circuit diagram 1
Circuit diagram wsif9h0rwf

Code

Code used in the arduinoC/C++
  //VISIT : www.robotechmaker.com

  const int pingTrigPin = 12; //Trigger connected to PIN 7   
  const int pingEchoPin = 10; //Echo connected yo PIN 8   
  int buz=5; //Buzzer to PIN 4   
  void setup() {   
  Serial.begin(9600);   
  pinMode(buz, OUTPUT);   
  }   
  void loop()   
  {   
  long duration, cm;   
  pinMode(pingTrigPin, OUTPUT);   
  digitalWrite(pingTrigPin, LOW);   
  delayMicroseconds(2);   
  digitalWrite(pingTrigPin, HIGH);   
  delayMicroseconds(5);   
  digitalWrite(pingTrigPin, LOW);   
  pinMode(pingEchoPin, INPUT);   
  duration = pulseIn(pingEchoPin, HIGH);   
  cm = microsecondsToCentimeters(duration);   
  if(cm<=50 && cm>0)   
  {   
  int d= map(cm, 1, 100, 20, 2000);   
  digitalWrite(buz, HIGH);   
  delay(100);   
  digitalWrite(buz, LOW);   
  delay(d);  
  }   
  Serial.print(cm);    
  Serial.print("cm");   
  Serial.println();   
  delay(100);   
  }   
  long microsecondsToCentimeters(long microseconds)   
  {   
  return microseconds / 29 / 2;   
  }   
   

Credits

Img 20171014 215307200 sp7evwssmq
Muhammed Azhar
1 project • 24 followers
I am Muhammed Azhar a 17 y/o maker from India. Visit my blog for more projects- robotechmaker.com
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog