I feel like a potato in the mist Ramy's project Synchronize DC motors using optical limit switches. Please see this document