The purpose of this lab was to get acquainted with the automatic control system hardware, and set up the AEV software. Activities consisted of basic programming, uploading programs to the Arduino and testing, and becoming familiar with troubleshooting techniques.
Progress Report questions:
Comment on the performance of the electric motors (i.e., in scenario 1 line 1, did the propeller begin to rotate at the start of the program or was there resistance observed in the motor to rotate the propeller at low speeds?).
When starting the motors it takes a few milliseconds for the propellers to start rotating, but overall the motors start working within a second or less.
Deliverables: Arduino Function Calls
Code for Scenario 1:
void myCode()
{
//———————————————————————————————————-
// myCode();
//
celerate(1,0,15,2.5); //Accelerate motor one from start to 15% power in 2.5 seconds.
goFor(1); //Run motor one at a constant speed (15% power) for 1 second.
brake(1); //Brake motor one.
celerate(2,0,27,4); //Accelerate motor two from start to 27% power in 4 seconds.
goFor(2.7); //Run motor two at a constant speed (27% power) for 2.7 seconds.
celerate(2,27,15,1); //Decelerate motor two to 15% power in 1 second.
brake(2); //Brake motor two.
reverse(2); //Reverse the direction of only motor 2.
celerate(4,0,31,2); //Accelerate all motors from start to 31% power in 2 seconds.
motorSpeed(4,35); //Run all motors at a constant speed of 35% power for 1 second.
goFor(1); //Run all motors at a constant speed of 35% power for 1 second.
brake(2); //Brake motor two
goFor(3); //Keep motor one running at a constant speed (35% power) for 3 seconds.
brake(4); //Brake all motors for 1 second.
goFor(1); //Brake all motors for 1 second.
reverse(1); //Reverse the direction of motor one.
celerate(1,0,19,2); //Accelerate motor one from start to 19% power over 2 seconds.
motorSpeed(2,35); //Run motor two at 35% power.
goFor(2); //Run both motors for 2 seconds.
motorSpeed(4,19); //Run both motors at a constant speed (19% power).
goFor(2); //For 2 seconds.
celerate(4,19,0,3); //Decelerate both motors to 0% power in 3 second
brake(4); //Brake all motors.
//—————————————————————————————-