In Lab 4, the team built the AEV Prototype as usual, but added external sensors to the wheels of the AEV to control its movements even further through the Arduino. New commands were learned to utilize these sensors.
The lab also required the team to program the AEV Prototype to travel approximately half the track. The team struggled to accomplish this task at first, as the team’s prototype is very lightweight and travels faster than the average AEV! Eventually the team accomplished the goal, and the programming was sound. The programming features almost all of the new commands learned in this lab. The programming can be seen below:
Programming:
//Run all motors at 25% for 2 secondsmotorSpeed(4,25);goFor(2);//Run all motors at 20% and goToAbsolutePosition function to go 13.5 feetmotorSpeed(4,25);goToAbsolutePosition(332);//Reverse all motorsreverse(4);//Run all motors at 30% for 1 secondmotorSpeed(4,30);goFor(1);//Brake all motorsbrake(4);