I want to use a distance sensor like the HC-SR04 to power a stop light like parking sensor for my garage. I have seen a lot of tutorials on how to use the HC-SR04 to power a single LED and found the schematic below on how to control up to 14 LEDs by hooking them onto the 5v and using a transistor. I have added a box where I would hook the sensor in. My question is, would it work if I had the sensor hooked into the 5v as well. The plan is to have 3 sets of 14 LEDs and have one set on at any given time. I plan on using an Arduino Uno.
If I am understanding correctly, you have 3 LEDs ... call them A, B and C (the fact that they are a group of 14 LEDs is a red herring). As a function of the distance measured, you want ONE of LED A, B or C lit.
Since you are using an Arduino, you have GPIO pins. Connect a different GPIO to each of A, B and C. You can then write an application that senses the distance (as measured by the HC-SR04) and depending on the distance returned, have a set of "if" statements which will choose which of the GPIOs to set HIGH and the others LOW. The GPIO set HIGH will switch on the corresponding LED.
In fact, its going to look a lot like this Instructable: