Lab 2 Arduino Code

reflectanceSensorTest();                 //Test reflectance Sensor

motorSpeed(4,25);                          //Run all motors at a constant speed of 25% power for 2 seconds

goFor(2);

motorSpeed(4,20);  

goToAbsolutePosition(332);        //Run all motors at a constant speed of 20% and using the goToAbsolutePosition function travel a total distance of 13.5 feet (from the starting point).

reverse(4);                                        //Reverse the motors.

motorSpeed(4,30);

goFor(1);                                          //Run all motors at a constant speed of 30% power for 1 second

brake(4);                                         //Brake all motors.