   TCCR1B = 0;     // same for TCCR1B
 
   // set compare match register to desired timer count:
-  OCR1A = 1062;   // scale = 1024, OCR1A = (xxx / 64 / 1024)
+  OCR1A = 1562;   // scale = 1024, OCR1A = (xxx / 64 / 1024)
 
   // turn on CTC mode:
   TCCR1B |= (1 << WGM12);


MotorShield md;

volatile int direction;
volatile int delta;
volatile int rightMCtr, leftMCtr;


void setup() {
    pinMode(motor_R, INPUT);

}

void loop() {
    int grid = 3;
    delta = 0;
    timer = 0;
    rightMCtr = leftMCtr = 400 * grid;

    setTimerInterrupt();
    attachInterrupt(1, countRight, RISING);

    //sp.setSpeedLvls(3, 3);
    md.init();
    md.setSpeeds(300, 300);
    while (--leftMCtr) {
        while (digitalRead(motor_L));
        while (!digitalRead(motor_L));
        //wait for one cycle
    }

    detachTimerInterrupt();
    detachInterrupt(1);

    md.brakeWithABS();
    Serial.println(delta);
    Serial.println(timer);
    delay(3000);
}

void countRight() {
    --rightMCtr;
