Exercise 2- Sensor Test

Picture of sensors connected to AEV:

The function of the reflectance sensors is to measure how much the wheel turns, and in turn measure the distance travelled. This allows the program to know how far the AEV has gone and in turn act out the entire program correctly as coded.

motorSpeed(4,25);

Run all motors at a constant speed of 25% power
goFor(2);

For 2 seconds
motorSpeed(4,20);

Run all motors at a constant speed of 20%
goToAbsolutePosition(12);

Go to the 12th marks
reverse(4);

Reverse all motors
motorSpeed(4,30);

Run all motors at a constant speed of 30% power
goFor(1.5);

Run for 1.5 seconds
brake(4);

Brake all motors