Every Police Car needs flashing lights

This weekend didn’t afford me enough time for personal projects, but I did have a few moments to solder connections onto the LED system on the RC police car I’ve been modifying. (I also drilled out the rear window).

Controlling the LEDs is simple: they  all share a positive terminal, bring a cathode to ground and you have light. Controlling the lights via an MSP430 is simple – set the connected pin to be an output, and set the pin low. The LED board has built in resistors, so there’s no need to add them.

There are 8 LEDs, 4 of which are independently controlled:

  1. The two (2) Headlights and two (2) Brake lights
  2. The Blue lightbar
  3. The White lightbar on the left
  4. The White lightbar on the right
  5. The Red lightbar

With the soldering of connectors finished, I hooked them up to the Launchpad and made a quick modification to the Hackaday.com Hello World program –  this time  setting 5 pins as outputs, and turning on all the lights except the blue and white lightbar on the left. I toggle the entire lightbar approximately every ~6th of a second.

The specific pins to control each light will definitely change in the future, but seeing blinky lights in the meantime is always fun. I’m happy with my choice of this particular RC car – having 8 LEDs makes it real easy to display status codes and will definitely help with debugging later.

Next up: connect a PING sensor to  a small servo to the roof … once my box of servos arrive.

Leave a Reply

Your email address will not be published. Required fields are marked *

*