Progress Reports

  1. There was some resistance in turning the motor at low speeds, when the program started. This is expected because motor’s can’t have no resistance.
  2. The commands for the AEV may limit the success of its movement of the scenario because the commands may not occur immediately due to the need for communication, and the time for any vehicle to come to a stop or accelerate.

//Code for Scenario 1

celerate(1,0,15,2.5);

motorSpeed(1,15);

goFor(1);

brake(1);

celerate(2,15,27,4);

motorSpeed(2,27);

goFor(2.7);

celerate(2,27,15,1);

brake(2);

reverse(2);

celerate(4,0,31,2);

motorSpeed(4,35);

goFor(1);

brake(2);

motorSpeed(1,35);

goFor(3);

brake(4);

goFor(1);

reverse(1);

celerate(1,0,19,2);

motorSpeed(2,35);

motorSpeed(1,19);

goFor(2);

motorSpeed(4,19);

goFor(2);

celerate(4,19,0,3);

brake(4);

//Code for Scenario 2

motorSpeed(4,25);

goFor(2);

motorSpeed(4,20);

goToAbsolutePosition(295);

reverse(4);

motorSpeed(4,30);

goFor(1.5);

brake(4);

 

Figure 1: Reflectance Sensors

  1. The reflectance sensors control how far the AEV goes by keeping track of the number of marks pass the sensors when the wheel turns on the track.

//Code for Scenario 3

celerate(4,0,25,3);

goFor(1);

motorSpeed(4,20);

goFor(2);

reverse(4);

motorSpeed(4,25);

goFor(2);

brake(4);

 

 

 

Total Energy VS Distance

//Propeller Test

celerate(4,0,42,5);

goFor(2);

brake(4);

reverse(4);

celerate(4,0,42,5);

goFor(2);

brake(4);

 

//No Servo Test

reverse(4);

motorSpeed(4,30);

goToAbsolutePosition(150);

goToAbsolutePosition(195);

while(getVehiclePostion()<292){

 motorSpeed(4,15);

 goToRelativePosition(5);

 brake(4);

}

reverse(4);

motorSpeed(4,15);

goFor(1);

 

//Servo Test

reverse(4);

motorSpeed(4,30);

goToAbsolutePosition(195);

while(getVehiclePostion()<292){

 motorSpeed(4,15);

 goToRelativePosition(5);

 brake(4);

}

rotateServo(180);

 

//Final Performance Test

//Part 1

reverse(4);

motorSpeed(4,30);

goToAbsolutePosition(d1);

while(getVehiclePosition()<d2){
motorSpeed(4,25);

goToRelativePosition(5);

}

reverse(4);

goFor(1.5);

reverse(4);

motorSpeed(4,0);

goFor(9.5);

//Part 2

motorSpeed(4,30);

goToAbsolutePosition(d3);

while(getVehiclePosition()<d4){
motorSpeed(4,25);

goToRelativePosition(5);

}

reverse(4);

goFor(1.5);

motorSpeed(4,0);

goFor(6);

motorSpeed(4,45);

goToAbsolutePosition(d5);

//Part 3

while(getVehiclePosition()>d6){
motorSpeed(4,40);

goToRelativePosition(-5);

}

reverse(4);

goFor(1.5);

motorSpeed(4,0);

goFor(9.5);

//Part 4

reverse(4);

motorSpeed(4,45);

goToAbsolutePosition(d7);

while(getVehiclePosition()>0){
motorSpeed(4,40);

goToRelativePosition(-5);

}

reverse(4);

goFor(1.5);