The Ohio State University: College of Engineering

Lab 02 – External Sensors & System Analysis 1 Code

reverse (4); // both motors reverse so they move forward

motorSpeed(4, 45); // both motors move at a speed of 45% for 2 seconds

goFor(2);

motorSpeed(4, 40); // both motors move at a speed of 40%

goToAbsolutePosition(332); // the AEV moves to a position of 332 marks

reverse(4); // both motors reverse direction

motorSpeed(4, 45); // both motors move at a speed of 45% for 1 second

goFor(1);

brake(4); // both motors stop