The two screen captures below show the output of the photo-transistor and comparator circuit. The comparator circuit compares the output to the photo-transistor with a reference voltage of 4V (mid-way between the peak and trough) and outputs 0V or 5V depending on whether the sensor output is bigger or smaller than 4V. The periodic glitches seen in the circuit is from the H-bridge, which is driving the motor with a 25% duty-cycle square wave. For the final mobot we will use separate power sources for the motor and the rest of the mobot.