R&D Program
celerate(4,0,25,3);//the first 3 seconds will be the aev accelerating
goFor(2);//the next will run at constant speed for 2 seconds
brake(4);//power is cut
celerate(4,0,10,1);//the next second will have the aev rapidly accelerating
brake(4);//power is cut
motorSpeed(4,25);//speed is set to 25
reverse(4);//speed is reversed
celerate(4,25,10,3);//aev slows down for 3 seconds
brake(4); //power is cut
AEV Performance Test 1 Version 1
celerate(4,0,35,2); //The Aev accelerated from 0% to 35% on all the motors for 2.0 seconds
celerate(4,35,30,1); //The Aev accelerated from 35% to 30% on all the motors for 1.0 seconds
goToAbsolutePosition(350); //The ardruino went to mark 350.0
goFor(1); //The Aev runs for 1.0 seconds
brake(4); //Power stopped on all the motors
goFor(7); //The Aev runs for 7.0 seconds
motorSpeed(4,10); //The Aev speed is now 10% on all the motors
goFor(1); //The Aev runs for 1.0 seconds
brake(4); //Power stopped on all the motors
AEV Performance Test 1 Version 2
celerate(4,0,35,2); //The Aev accelerated from 0% to 35% on all the motors for 2.0 seconds
celerate(4,35,30,1); //The Aev accelerated from 35% to 30% on all the motors for 1.0 seconds
goToAbsolutePosition(240); //The ardruino went to mark 240.0
reverse(4); //The Aev is now moving backwards
celerate(4,30,10,2); //The Aev accelerated from 30% to 10% on all the motors for 2.0 seconds
brake(4); //Power stopped on all the motors
goFor(10); //The Aev runs for 10.0 seconds
motorSpeed(4,30); //The Aev speed is now 30% on all the motors
goFor(1); //The Aev runs for 1.0 seconds
brake(4); //Power stopped on all the motors
celerate(4,0,35,2); //The Aev accelerated from 0% to 35% on all the motors for 2.0 seconds
celerate(4,35,30,1); //The Aev accelerated from 35% to 30% on all the motors for 1.0 seconds
goToAbsolutePosition(350); //The ardruino went to mark 350.0
reverse(4); //The Aev is now moving backwards
celerate(4,30,10,2); //The Aev accelerated from 30% to 10% on all the motors for 2.0 seconds
brake(4); //Power stopped on all the motors
AEV Performance Test 1 Version 3
motorSpeed(4,45); //The Aev speed is now 45% on all the motors
goToAbsolutePosition(280); //The ardruino went to mark 280.0
reverse(4); //The Aev is now moving backwards
motorSpeed(4,20); //The Aev speed is now 20% on all the motors
goFor(2); //The Aev runs for 2.0 seconds
reverse(4); //The Aev is now moving backwards
while(getVehiclePostion()>=295){
goFor(.1);//The Aev will continue to run until it reaches mark 295
}
brake(4); //Power stopped on all the motors
goFor(8); //The Aev runs for 8.0 seconds
motorSpeed(4,30); //The Aev speed is now 30% on all the motors
goFor(5); //The Aev runs for 5.0 seconds
brake(4); //Power stopped on all the motors
AEV Performance Test 1 Version 4
//the program uses the data type double
//testing is at 4:45
//reverse and while loop would get deleted and absolute would be set to 303 to restore
motorSpeed(4,45);
goToAbsolutePosition(280);
reverse(4);
motorSpeed(4,20);
goFor(2);
reverse(4);
while(getVehiclePostion()>=295){
goFor(.1);
}
brake(4);
goFor(8);
motorSpeed(4,30);
goFor(5);
brake(4);
AEV Performance Test 1 Version 5
//testing is at 4:45
//reverse and while loop would get deleted and absolute would be set to 303 to restore
motorSpeed(4,42);
goToAbsolutePosition(250);
reverse(4);
motorSpeed(4,20);
goFor(2.5);
reverse(4);
motorSpeed(4,20);
while(getTotalMarks()<=292){
}
brake(4);
goFor(7);
motorSpeed(4,30);
goFor(4);
brake(4);
Motor Configuration Test
//forwrd pull
/*
motorSpeed(4,30);
goFor(3);
brake(4);
reverse(4);
celerate(4,0,30,2);
brake(4);
*/
//push
/*
reverse(4);
motorSpeed(4,30);
goFor(3);
brake(4);
reverse(4);
celerate(4,0,30,2);
brake(4);
*/
//mixed
/* reverse(1);
motorSpeed(4,30);
goFor(3);
brake(4);
reverse(4);
celerate(4,0,30,2);
brake(4);
*/
//forward with caboose
/*
reverse(4);
motorSpeed(4,30);
goFor(3);
brake(4);
reverse(4);
celerate(4,0,30,2);
brake(4);
*/
//push with caboose
motorSpeed(4,30);
goFor(3);
brake(4);
reverse(4);
celerate(4,0,30,2);
brake(4);
//test mixed with caboose
/*
reverse(2);
motorSpeed(4,30);
goFor(3);
brake(4);
reverse(4);
celerate(4,0,30,2);
brake(4);
*/
AEV Performance Test Final Version 1
//cabooe is 348 grams
//aev is 255 grams
//performance test 1
//speeds up ramp
motorSpeed(4,42);
goToAbsolutePosition(260);
reverse(4);
motorSpeed(4,20);
goFor(2);
reverse(4);
brake(4);
//Stops at gate
goFor(9);
//performance test 2
motorSpeed(4,30);
goFor(4.6);
motorSpeed(4,20);
//goes down decline
while(getTotalMarks()<=500){
}
//attaches to caboose
goFor(7);
reverse(4);
motorSpeed(4,45);
goToAbsolutePosition(600);
reverse(4);
motorSpeed(4,40);
reverse(4);
motorSpeed(4,20);
while(getTotalMarks()<=750){
}
brake(4);
AEV Performance Test Final Version For Room 224
/**
* ROOM 224
*
*/
//performance test 1
//speeds up incline
motorSpeed(4,41);
goToAbsolutePosition(260);
reverse(4);
motorSpeed(4,20);
goFor(2);
reverse(4);
//coasts to gate
motorSpeed(4,27);
while(getTotalMarks()<=394){
}
brake(4);
//performance test 2
goFor(9);
motorSpeed(4,30);
goFor(5);
motorSpeed(4,27);
//travels down ramp
while(getTotalMarks()<650){
}
brake(4);
//attaches to caboose
goFor(9);
//final performance test
reverse(4);
motorSpeed(4,45);
//goes up incline
while(getTotalMarks()<950){
}
motorSpeed(4,39);
while(getTotalMarks()<=1050){
}
reverse(4);
motorSpeed(4,38);
goFor(2);
brake(4);
//stops at gate
goFor(8);
reverse(4);
motorSpeed(4,40);
goFor(4);
//decline
reverse(4);
motorSpeed(4,22);
goFor(4);
motorSpeed(4,37);
goFor(1);
brake(4);
AEV Performance Test Final Version For Room 308
/**
* ROOM 308
*
*/
//performance test 1 portion
//goes up incline
motorSpeed(4,42);
goToAbsolutePosition(260);
reverse(4);
motorSpeed(4,20);
goFor(1.85);
reverse(4);
brake(4);
//stops at gate
goFor(9);
//performance test 2 portion
motorSpeed(4,30);
goFor(4.9);
motorSpeed(4,25);
//approaches decline
while(getTotalMarks()<650){
}
brake(4);
//attaches to caboose and waits
goFor(9);
//final performance test portion
reverse(4);
motorSpeed(4,45);
//speeds up incline
while(getTotalMarks()<950){
}
motorSpeed(4,35);
while(getTotalMarks()<=1050){
}
reverse(4);
motorSpeed(4,37);
goFor(2);
brake(4);
//stops at gate
goFor(7);
reverse(4);
motorSpeed(4,43);
goFor(4);
reverse(4);
//slowly coasts through decline
motorSpeed(4,20);
goFor(4);
motorSpeed(4,23);
goFor(1);
brake(4);