Code Used:
Coasting:
// Run all motors at 35% for 4 seconds
motorSpeed(4,35);
goFor(4);
// Run all motors at 0% for 10 seconds
motorSpeed(4,0);
goFor(10);
motorSpeed(4,35);
goFor(4);
// Run all motors at 0% for 10 seconds
motorSpeed(4,0);
goFor(10);
Fire motors and reverse to slow down:
reverse(4); //reverses the polarity of the motors at the start of the program (backwards propellers)
motorSpeed(4,40); //Sets motors to run in the forward direction at 40% power
goFor(5); //Runs motors in forward direction for 5 seconds
brake(4); //Cuts power to all motors
reverse(4); //changes direction of motors
motorSpeed(4,40); //Sets motors to run in the forward direction at 40% power
goFor(5); //Runs motors in forward direction for 5 seconds
brake(4); //Cuts power to all motors
reverse(4); //changes direction of motors
motorSpeed(4,55); //fires motors at a high speed in the opposite direction to slow AEV down
goFor(2); //fires motors in the opposite direction at a high speed for 2 seconds
goFor(2); //fires motors in the opposite direction at a high speed for 2 seconds
No motors – servo arm slowing down:
reverse(4); //Reverses polarity of all motors (Our motors run backwards)
motorSpeed(4,40); //Sets all motors to 40% speed
goFor(5); //Runs all motors for 5 seconds
brake(4); //Cuts power to all motors
rotateServo(75); //Rotates servo motor to 75 degrees above the horizontal
goFor(2);
motorSpeed(4,40); //Sets all motors to 40% speed
goFor(5); //Runs all motors for 5 seconds
brake(4); //Cuts power to all motors
rotateServo(75); //Rotates servo motor to 75 degrees above the horizontal
goFor(2);
Coast Graphs:
time:
distance:
Power Break Graphs:
time:
distance:
Servo Graphs:
time:
distance:
Progress Report Questions
1.Describe how your team evaluated the servo motor
Our team tested the servo motor by using the built in “rotateServo();” command with angles from 0 degrees to 180 degrees.
2.Based on your methodology, what conclusions were drawn?
Our team noticed that the servo defaults to 0 degrees when plugged in and that at least 75 degrees of rotation is required for the servo to make contact with the track and slow down the AEV.
Website Deliverables
1.Provide a picture of how you integrated your servo with your AEV.
2.Indicate whether you will use the servo moving forward and how it will be used.
Our team plans to run trials with the servo motor brake in preparation for performance test #1. Since the servo motor uses less energy, it would be more efficient than utilizing power braking. The only issue foreseen is whether or not the servo motor will consistantly stop the AEV at a desired position and whether or not the brake will disengage from the track without moving the AEV around.






