Menu

Uno parking sensor that beeps faster as you get closer (HC-SR04 + passive buzzer)
📰

Uno parking sensor that beeps faster as you get closer (HC-SR04 + passive buzzer)

#arduino#redditarduino#beeps#closer#sr04
Reading 0:00
15s threshold
Uno parking sensor that beeps faster as you get closer (HC-SR04 + passive buzzer)

Classic one, but I wanted to do it properly: a parking sensor on an Arduino Uno that beeps faster the closer something gets, like the ones in cars.

Wiring is tiny: HC-SR04 with TRIG on pin 2 and ECHO on pin 3, and a passive buzzer on pin 4. That's it.

What made it feel right:

  • The beep interval scales with distance instead of switching between two or three fixed speeds, so you can actually "feel" an object getting closer.
  • Past a minimum distance it goes to a solid tone, same as a real car.
  • Ultrasonic readings jump around on soft or angled surfaces, so a few readings get averaged before deciding the beep rate. Without that the beeping stutters.

I built this with Soldr, an AI agent we're making. I gave it the pins I'd already wired and it wrote the sketch around them.

Next idea is an LED bar alongside the beeps. Anyone done this with a VL53L0X instead of the HC-SR04? Curious if it's worth it.

submitted by /u/Compoden
[link] [comments]