Week 6 Code

Week 6 Code

reverse(1);

reverse(2);

celerate(4,0,50,1);

motorSpeed(4,50);

goToAbsolutePosition(-102);

brake(1);

brake(2);

Comments: The AEV travels forward towards the gate, power is cut to the motors before the AEV reaches the gate but it travels too far after power is cut and activates the second sensor causing the gate to remain up. A braking procedure will have to be implemented into the code to allow the AEV to come to a stop activating the first sensor while remaining in front of the second sensor.