Simple code for the msp430 launchpad to drive 6 LEDs as if they were traffic lights. The 3 LEDs on the right are BLED, YLED and RLED. The ones on the left are BLED2, YLED2, RLED2. An extra delay has been added when the light changes from red to green to simulate any prevention of accidents due to cars running a red light.
Link for video at higher resolution
Schematic: For the schematic use resistors that matches with the forward voltage and current that LEDs need. Also note that this set up is for the video above. That said the pins are for the Launchpad, if need to be run by just the MSP430 a 47K Resistor needs to be added from the reset to VCC
Schematic made with iCircuit app on Apple iPad
Link for video at higher resolution
Schematic: For the schematic use resistors that matches with the forward voltage and current that LEDs need. Also note that this set up is for the video above. That said the pins are for the Launchpad, if need to be run by just the MSP430 a 47K Resistor needs to be added from the reset to VCC
Schematic made with iCircuit app on Apple iPad
The code is below: