Lab 02

Situation-

The objectives of lab 2 are to become familiar with the external sensor hardware components and troubleshooting techniques, and program function calls for the external sensor. In this lab, we construct the sample AEV design and set up reflectance sensors on AEV. Before testing on tract, we test the reflectance sensor by “reflectanceSensorTest();”.  After that, we write code according to the given scene. And the we upload the code to the AEV controller and start the AEV. The program ran smoothly and the motors do what the commands ask.

Results and Analysis-

The motors do what the commands ask in most of situation. However, according to the actual test, we find that the commands used in this lab may limit the success of completion of the scenario. We need take inertia into consideration. For example, the AEV won’t stop as soon as the brake command apply. So we need to change our code according to the actual situations. The code for the external sensors program can be found here.

Takeaways-

The function of reflectance sensors is to record how far the AEV has traveled. They do this by using the reflective tape on the wheels and then the Arduino records the number of marks which is what the code is written in to tell the AEV when to stop or start. The reflectance sensors are a large part of the AEV and allow the user to precisely tell the AEV when to go forwards, backwards, and brake based on the number of marks it has traveled which is what the sensors are recording from the wheels.