Advanced Research and Development Arduino Codes

AR&D 1: Coasting vs Power Braking vs Servo

Code to test coasting:

//reverse all motors
reverse(4);
//accelerate all motors from rest to 35% power for 2 seconds
celerate(4,0,35,2);
//Run all motors are 35% to absolute position 197
motorSpeed(4,35);
goToAbsolutePosition(197);
//Brake all motors
brake(4);

Code to test power braking:

//reverse all motors
reverse(4);
//accelerate all motors from rest to 35% power for 2 seconds
celerate(4,0,35,2);
//Run all motors are 35% to absolute position 197
motorSpeed(4,35);
goToAbsolutePosition(197);
//Brake all motors
brake(4);
//reverse all motors
reverse(4);
//Run all motors at 35% power for 2 seconds
//AEV should come to a stop via power braking
motorSpeed(4,35);
goFor(2);

Code to test servo:

//reverse all motors
reverse(4);
//accelerate all motors from rest to 35% power for 2 seconds
celerate(4,0,35,2);
//Run all motors are 35% to absolute position 197
motorSpeed(4,35);
goToAbsolutePosition(197);
//Brake all motors
brake(4);
//Begin Braking Scenarios
//SERVO BRAKE
rotateServo(65);

AR&D 2: Propellor Configurations


//All motors go at 35% power to an absolute position 197
//All motors brake