Preliminary R&D Code

Code used during the Preliminary R&D stage

motorSpeed(4,25); // initializes both motors at 25% power 

goFor(2); // both motors run at 25% power for 2 seconds 

motorSpeed(4,20); // sets both motors to 20% power 

goToAbsolutePosition(295); // both motors move 295 marks (12 feet) at 20% power 

reverse(4); // reverses the direction of both motors 

motorSpeed(4,30); // sets both motors to 30% power 

goFor(1.5); // both motors run for 1.5 seconds 

brake(4); // brakes both motors