So the hardware on the bar end brake light prototype is complete.
I need to work on the software to get the sensitivity right (solution posted here). The initial code only used one axis of accel data. Better to use two and compare against a floating reference. If an absolute reference (say horizontal) is used, stopping on a hill might trigger the brake light. So more work to come.
I was definitely pleased with the package which slides right into the bar snuggly. I had to shave off some plastic on the DIP socket to get the oscillator to fit. The chipped part above (upper left of IC) is a testament to the snug fit. I used an unregulated 6V mini battery to power the circuit which is the max voltage rating for the Mega. The accel has its own 3V regulator. The accel reading seems to be coupled with the LED on/off state. Maybe I need larger caps on the digital and analog pins. Any ideas welcome.
I use the arduino environment to program the Mega. Below is my development board with the same accel plus a gyro that will eventually go on the SharkFin. After I program the chip, I pop it into the socket on the bar end unit.
This picture shows the unit installed. I found the perfect switch at Radio Shack (see bottom of picture).