pR&D 3 Code

// reflectanceSensorTest();

int x = getForwardCounts();
motorSpeed(4,-50); //Forward at 50% speed for 0.05 seconds to overcome static friction
pauseFor(.05);
motorSpeed(4,-33); //Power is reduced to 33% for 3 seconds after static friction is no longer in effect
pauseFor(3);
motorSpeed(4,-20); //Motor speed is then reduced to 20%
int y = x;
while(y – x < 296)
y = getForwardCounts();
}
motorSpeed(4,0); //All motors stop for 3 seconds
pauseFor(3);
motorSpeed(4,30); //All motors run at 30% power in the backward direction until they reach their original position
int m = getBackwardCounts(); int n = m;
while(n – m < 197)
{
n = getBackwardCounts();
}

motorSpeed(4,0); //All motors stop