After some searching on the web and plenty of impatient waiting for packages to arrive I was finally able to connect and control 17 LEDs and an Ultrasonic sensor in a show of lights.
Now enough talking and more constructing...
Step 1: Materials
1x Arduino Uno
17x 5mm LED
4 each of Red, Green, Yellow, Blue. You will also need an additional 17th for your handle bars. A diffused LED will be a little less jarring for your eyes. Make sure than none of them draw more than 40mA. These are available through most every electronics website. You can also buy them at Radio Shack, although, in my experience they always cost a little more in a pysical location versus an online store.
A helpful resistor calculator can be found here. Allelectronics has a great selection page to choose from.
Homedepot has a number of cheap and sturdy options or Allelectronics which is what I used. Make sure to buy something at least a 1/4 bigger than the Arduino in each direction. The one that I used fit a little to snuggly.
1x Perf board
22 AWG wire
One color should be fine and you will not need more than a couple of feet.
1x Ultrasonic Proximity sensor
There a number of options depending on what kind of range you want, but I used this one from Sparkun which has a range of 6.45 meters.
1x Switch It should not need to carry more than an amp and should be capable of 9v. Try to get one with a neck like this and two legs, however this particular switch can handle far more amps than you will ever need with this project
1x 9v Battery holder and 9v battery
Velcro, Zip ties, or some other material to attach the box to the bike. Depending on the size of your saddle bag you might be able to fit it inside of that.
D.I.Y style patience
Dremel or some sort of similar cutting tool
Wire stripper or a knife will work
Step 2: Schematic
Step 3: LED Resistors and Solder
On the Perf board the ground runs along the outside so the short legs of the LEDs are always of the outside while the longer leg is on the inside. Run a stripped hookup wire along the outside soldering all of the short legs and then clip the ends of off the LEDs so that they each have about 1/2 inch sticking up.
Next solder the appropriate type of resistor to each inside leg of the LEDs and from there solder about 6 inches or hookup wire to the opposite side of the resistor as can be seen in the schematic.
Finally one more LED, the 17th will run up to your handle bars. Choose your favorite colored LED (as you will be seeing it a lot) and connect it to a resistor and hook up wire. Connect it to your handle bars and now you have an LED that will alert you when a car comes to close. Be sure not to aim the LED directly at yourself otherwise it might surprise/blind you with more then help you and leave enough slack for the handle bars to turn.
Step 4: Adding the Ultrasonic Sensor
Step 5: Code
I highly suggest visiting arduino.cc if this is all new to you as they have fantastic documentation which will most likely answer any questions you have about the programs or you can ask me.
If you modify the design in some way or come up with a neat program I would love to see a photo/video of it if you attach it below in the comment section for everyone to see.
The program that finally will ended up resting in the Arduino is called BlinkFinal.
Below is a video of the patterns just to give you an idea of what they should look like. Trust me, though, they look much better in person.
Step 6: Case
The Arduino is a smidge to big to fit in my box on one face so it is resting diagonally, which really will not injure it. First, however use a Dremel to cut out one of the smallest faces of the box which is where the Perf Board with LEDs and sensor will rest.
Next drill out a small hole on the side of the box for the switch. The hole should be the width of the switches "neck". This way you can stick the "neck" through and tighten the nuts from both sides which will hold the switch in place and that also means that less is sticking out of the box.
Once you have the switch in place cut the red wire on the 9v batter holder in half. Solder the positive end of the battery holder to one leg of the switch and solder the cut off half to the other leg. Plug the ground lead of the battery holder into the Gnd pin next to the Vin pin on the Arduino and the positive end from the switch into the Vin pin. Now you have an "on" "off" switch, although, the hardest part is seems is remembering to flick the switch and turn it off.
Give everything one last test (it gets annoying when you seal everything up and one LED starts acting finicky) and place it in the box. Wrap some black electrical tape around the protruding perf board to make a nice seal that will hold everything in place (as drumroll starts to sound). Aaaand you're done! Time to put this on your bike and give it a test run.
Step 7: Mounting on a Bike
Now pack all the tools and bits of wire up and go for a ride with some friends and light up the night!