Watch the test video to see how it works:
Runs in one of three modes: waiting, parking, and parked. "Waiting" is when no car has been detected for a while, and goes to a 2 second ping cycle, with deep sleep between pings. "Parked" is when a car is detected, but has not moved recently; then it goes to a 1 minute cycle. "Parking" runs an active delay loop at 100 ms. Red and green LEDs are constant, yellow LED flashes at a rate proportional to distance. LED flashing is controlled by timer interrupts, to avoid complicating the main loop.
STLs for a 3D printed enclosure is provided. Stand off holes are sized to self-tap with a #4 screw.
The PCB is suitable for reuse for any low power mobile Arduino-based project. Just remove the traces for the LEDs and their current limiting resistors and add your own components.
The schematic was mainly cribbed from the SparkFun Arduino Pro Mini and the LTC3525 datasheet. I chose an 8 MHz resonator because clock speed wasn't important and I wanted to reduce power consumption. I chose 5V because it is necessary for the SR04 sensor and it would complicate things to introduce separate rails, power down the 3.3V rail, etc. Also, those LTC3525 boost chips aren't cheap; more expensive than the microcontroller!