Lab 4 Codes

Lab 4 Results

Lab 4a code: designed to have the AEV stop just before the gate and take the data that the AEV gathered and download it as EEPROM data to see how the AEV performing energy, time, and position wise.

// The motors need to start in reverse tt make the AEV move forward
reverse(4);

// Set motor speed to 20 for all motors
motorSpeed(4, 20);

// Stop motors at 14 feet
goToAbsolutePosition(345);

// Stop motors
brake(4);

 

Lab 4b code:

// The motors need to start in reverse to make the AEV move forward
reverse(4);

// Set motor speed to 30 for all motors
motorSpeed(4, 30);

// Stop motors at 5.28 feet
goToAbsolutePosition(130);

// Brake just before the curve
brake(4);