Code Used for Initial Movement Testing (P)

 

After the reflectance sensor test was performed, basic movement code was uploaded to the arduino in order to test out the motor power and the AEV’s movement. Data was then collected as a start of research and development.

// Program between here——————————————————————-

// Accelerates all motors from start to 25% in 3 seconds

celerate(4,0,25,3);

// AEV runs at 25% motor power for 1 second after accelerating

goFor(1);

// All motors on 20% power for 2 seconds

motorSpeed(4,20);

goFor(2);

// Reverses all motors, set to 25% power for 2 seconds

reverse(4);

motorSpeed(4,25);

goFor(2);

// Cuts all power from the AEV

brake(4);

// And here——————————————————————————–

} // DO NOT REMOVE. end of void myCode()

 

(Go back to Team P’s code page)