Introduction: Social Distancing Detector
This device helps you maintain a distance of 1 meter away from people (or risk losing your hearing).
Step 1: Wiring
This step is easy, and if the diagram above doesn't work, the code has comments to help. The piezo buzzer VCC goes to digital pin 13, the trig pin goes to digital pin 6, and the echo pin goes to pin 5.
Power connections are standard.
Step 2: Code
The code is here at GitHub and it is archived. If you can't get it, I'll put the code into the comments too.
Step 3: Testing
Plug your Arduino in and run the code.
Put your hand in front of the sensor. You should hear a piercing shriek. If you don't, check your wiring. Most of my problems stem from either loose wires, wires that are not fully inserted into the breadboard, or wrong wiring. The code works, and has been fine-tuned to what works for my sensor. If yours seems to be off, adjust the code to 6 ft/1 m. Good luck!
Step 4: Finish!
This is a useful/fun project that can save lives. I didn't include a cover/case step or a clip for your belt, but those could be useful.
Congratulations on finishing!
Until next time,
Merry Making from g3holliday
Participated in the
Arduino Contest 2020