Listed below is the code (plus descriptions) for Team Earth’s Celerate trial run of the flat track portion. Each description is designated by two asterisk (*) marks and a phrase contained between. These are located to the right of every individual portion of code.
- brake(4); *Cuts power to each motor.*
goFor(2); *Extends powerless period for 2 seconds.*
celerate(4,40,20,1); *Initializes both motors at 40% speed and accelerates both to 20% speed in 1 second.*
goToRelativePosition(-140); *Continues power supply to the motors until a distance of –140 ticks is reached (140 ticks forward).*
brake(4); *Cuts power to each motor.*
goFor(1); *Extends powerless period for 1 second.*
celerate(4,40,20,1); *Initializes both motors at 40% speed and accelerates both to 20% speed in 1 second.*
goToRelativePosition(-140); *Continues power supply to the motors until a distance of –140 ticks is reached (140 ticks forward).*
brake(4); *Cuts power to each motor.*
reverse(4); *Reverses polarity of each motor to change direction of propulsion.*
celerate(4,45,20,1); *Initializes both motors at 45% speed and accelerates both to 20% speed in 1 second.*
goToRelativePosition(140); *Continues power supply to the motors until a distance of 140 ticks is reached (140 ticks backwards).*
brake(4); *Cuts power to each motor.*
goFor(1); *Extends powerless period for 1 second.*
celerate(4,40,20,1); *Initializes both motors at 40% speed and accelerates both to 20% speed in 1 second.*
goToRelativePosition(140); *Continues power supply to the motors until a distance of 140 ticks is reached (140 ticks backwards).*
brake(4); *Cuts power to each motor.*
reverse(4); *Reverses polarity of each motor to change direction of propulsion.*
celerate(4,10,15,3); *Initializes both motors at 10% speed and accelerates both to 15% speed in 3 seconds.*
brake(4); *Cuts power to each motor.*