Here is GRIS in Processing, revised to accommodate dual sensor mode communications between the computer and robot. The square on the left flashes data, while the square on the right flashes the clock signal.
Each data bit lasts two frames. The clock alternates from black (0) to gray (1) for each pair of data bit frames. When the robot microprocessor reads a clock 1, it will record the data sensor value. The clock must reset to a 0 bit before the next data sensor value will be recorded.
Separate data and clock lines are common for serial communications and this system should be very robust compared to my previous attempts to synchronize data transmission between the computer and robot with just a single sensor.