Quadrature encoder using two slot photointerrupters