For this years (2017) Boy Scout pinewood derby I asked my son to design the car himself. The deal was that, if he did enough of the work by his own initiative I'd add working headlights to his car.
He did his part and more (cool car Huck!) so I thought I should step up my game and add more than just headlights. I had a SparkFun "Shake on Wake" board sitting around and I realized it had an ATTiny MCU on it with a proper ISP header. Looking at SparkFun's firmware on GitHub I decided to repurpose the ATTiny's PWM to run the lights and to add a cool tail light feature where the "brake lights" would dim while in motion and would get bright when stopped, just like a real car. I whipped up a quick state-machine using Yakindu and routed out enough space in the car's belly for the SparkFun PCB. 3-ounces of hot glue and tungsten slugs later and we had what you see here.
You can check out the firmware on GitHub. Note that I didn't have access to a pinewood derby track while building this so I couldn't calibrate proper motion detection for the taillights. Instead I just have them dim for any motion. As long as the track is slightly bumpy this works fine.