Final Test Arduino Code

// Initialize useful constants…  double pi = 3.14159265359;  double marksPerFoot = 24.61538462;  double maxSpeed = 25;  double allMotors = 4;    // Designate positioning values for a single point of control and clarity…  double stopOne = 8 + pi –…

Performance Test 3 Arduino Code

Arduino Program A  // Initialize useful constants…  double pi = 3.14159265359;  double marksPerFoot = 24.61538462;  double maxSpeed = 25;  double allMotors = 4;    // Designate positioning values for a single point of control and clarity…  double stopOne = 8…

Performance Test 2 Arduino Code

Arduino Program A  // Initialize useful constants…  double marksPerFoot = 24.61538462;    // Initially reverse motors so that the AEV will move forward.  reverse(4);    // Set motor power to 25% and run until the sensor tracks a total of…

Performance Test 1 Arduino Code

Arduino Program A  // Set initial motor speed of 20% for all motors  reverse(4);  motorSpeed(4, 30);    // Use conversion of 24.62 marks per foot for 18 feet (the approximate distance to the gate)  // Go to absolute position  goToAbsolutePosition(24.62…

Lab 7 Arduino Code

Arduino Code  // Set initial motor speed of 20% for all motors  motorSpeed(4, 20);    // Use conversion of 24.62 marks per foot for 18 feet (the approximate distance to the gate)  // Go to absolute position  goToAbsolutePosition(24.62 * 18);…

Lab 6 Arduino Codes

Arduino Code  // Accelerate all motors from start to %25 percent over 3 seconds  celerate(4, 0, 25, 3);    // Run all motors at a 25% power for 1 second  motorSpeed(4, 25);  goFor(1);    // Run all motors at 20%…

Lab 5 Arduino Code

 // Accelerate all motors from start to %25 percent over 3 seconds  celerate(4, 0, 25, 3);    // Run all motors at a 25% power for 1 second  motorSpeed(4, 25);  goFor(1);    // Run all motors at 20% power for…

Lab 4 Arduino Code

// Set initial motor speed of 20% for all motors  motorSpeed(4, 20);    // Use conversion of 24.62 marks per foot for 18 feet (the approximate distance to the gate)  // Go to absolute position  goToAbsolutePosition(24.62 * 18);    //…

Lab 2 Arduino Code

//Run all motors 25% for 2 seconds  motorSpeed(4, 25);  goFor(2);  // 24.62 marks per feet  motorSpeed(4, 20);  goToAbsolutePosition(333);  // reverse all motors  reverse(4);    // Run all motors at 30% for 1 second  motorSpeed(4, 30);  goFor(1);  // brake all motors…

Lab 1 Arduino Code

//Accelerate motor one from start to 15% power in 2.5 seconds   celerate(1,0,15,2.5);  //Run motor one at a constant speed (15%) for 1 second   goFor(1);  //Brake motor one   brake(1);  //Accelerate motor two from start to 27% power in 4 seconds   celerate(2,0,27,4);…