For the race to the wall you will need to employ a reflective optical sensor to determine when you have reached the finish line. This PDF file shows you how to assemble the sensor circuit.
Remember to test the sensor by…
– connecting the orange and black leads up to a battery and verifying that the infra red emitting diode (the purple one) changes from deep purple to pinkish purple when viewed with a phone camera.
– moving the sensor back and forth between black and white surfaces and observing whether the voltage difference between the blue wire (input to micro) and black wire (ground) goes from 0V to 5.5V or thereabouts.
Afterwards the sensor can be connected to the circuit as follows
– orange wire to 3.3V (not the battery voltage)
– black wire to ground
– blue wire with output of sensor to one of the digital input pins on the MSP430.