Advanced R&D Code

BASE ORIENTATION CODE: (Kept constant for both vertical and horizontal tests)

celerate(4,0,25,3);

// Accelerate all motors from rest to 25 percent power in 3 seconds

goFor(1);

// Go 25 power for 1 seconds

motorSpeed(4,20);

//Run all motors at 20 percent power for 2 seconds

goFor(2);

reverse(4);

//Reverse all motors

motorSpeed(4,25);

goFor(2);

//run all motors at 2 power for 2 seconds

brake(4);

//break all motors

PROPELLER CONFIGURATION: (Kept constant for both two propeller and one propeller configurations)

celerate(4,0,25,3);

// Accelerate all motors from rest to 25 percent power in 3 seconds

goFor(1);

// Go 25 power for 1 seconds

motorSpeed(4,20);

//Run all motors at 20 percent power for 2 seconds

goFor(2);

reverse(4);

//Reverse all motors

motorSpeed(4,25);

goFor(2);

//run all motors at 2 power for 2 seconds

brake(4);

//break all motors

BATTERY VOLTAGE:

Between the two tests, the only thing changed in the code is the power in order to test when the battery voltage significantly affects the vehicle and when the battery should be replaced.

 

45% Power Test

//Runs motors at 45% power

motorSpeed(4,45);

//Runs motors for 6 seconds

goFor(6);

//Reverses all motors

reverse(4);

//Runs motors at 50% power for 1 second

motorSpeed(4,50);

goFor(1);

40% Power Test

//Runs motors at 40% power

motorSpeed(4,40);

//Runs motors for 6 seconds

goFor(6);

//Reverses all motors

reverse(4);

//Runs motors at 50% power for 1 second

motorSpeed(4,50);

goFor(1);