CDR Arduino Code

Code1

reverse(4);

motorSpeed(4,25);

goToAbsolutePosition(323);

reverse(4);

motorSpeed(4,38);

goFor(0.9);

brake(4);

goFor(9);

reverse(4);

motorSpeed(4,30);

goToAbsolutePosition(700);

brake(4);

reverse(4);

motorSpeed(4,35);

goFor(0.9);

brake(4);

goFor(7);

// second half

motorSpeed(4,40);

goToAbsolutePosition(530);

brake(4);

reverse(4);

motorSpeed(4,43);

goFor(0.9);

brake(4);

//

reverse(4);

goFor(10);

motorSpeed(4,45);

goToAbsolutePosition(160);

reverse(4);

motorSpeed(4,45);

goFor(0.9);

brake(4);

 

Code2

reverse(4);

motorSpeed(4,80);

goFor(1);

brake(4);

goToAbsolutePosition(355);

reverse(4);

motorSpeed(4,40);

goFor(0.9);

brake(4);

goFor(8);

 

//

reverse(4);

motorSpeed(4,82);

goFor(1);

brake(4);

goToAbsolutePosition(740);

brake(4);

reverse(4);

motorSpeed(4,20);

goFor(1.5);

brake(4);

goFor(7);

 

// second half

motorSpeed(4,95);

goFor(1.5);

brake(4);

goToAbsolutePosition(450);

reverse(4);

motorSpeed(4,55);

goFor(0.9);

brake(4);

 

reverse(4);

goFor(9);

motorSpeed(4,98);

goFor(1.8);

brake(4);