Lab 02

In Lab 02, we tested our demo AEV with different codes as well as attaching the sensors and testing them.

Glossary for Arduino Calls

The purpose of the function is what the function does, while the function call is how the function appears in the Arduino code. When coding the program for the Arduino, the function call is what should be entered to make the AEV carry out the correct purpose.

  • Function Purpose: Accelerates or decelerates motor(s), m, from start speed (%), p1, to end speed (%), p2 over a duration of t seconds.
    • Function Call: celerate(m,p1,p2,t);
  • Function Purpose: Initializes motors(s), m, at percent power, p.
    • Function Call: motorSpeed(m.p);
  • Function Purpose: Runs the motor(s) at their  initialized state for t seconds.
    • Function Call: goFor(t);
  • Function Purpose: Brakes motor(s), m. (Does not brake AEV, just stops motor(s) from spinning).
    • Function Call: brake(m);
  • Function Purpose: Reverses the polarity of the motor(s), m.
    • Function Call: reverse(m);
  • Function Purpose: Continues the previous command for n marks from the vehicle’s current position. n can be either negative or positive, positive meaning the vehicle is moving forward while negative means the vehicle is moving backwards.
    • Function Call: goToRelativePosition(n);
  • Function Purpose: Continues the previous command for n marks relative to the overall starting position of the AEV.
    • Function Call: goToAbsolutePosition(n);

Staff, OSU. “Preliminary R&D.” Box, The Ohio State University, 18 Aug. 2017, osu.app.box.com/s/ter1ysxfl88vej3wezqleed30cymth1p.

Sensors correctly secured to the AEV:

 

Function of reflectance sensors, their importance in completing MCR:

The function of the reflectance sensors is to sense what the wheels (which go on the AEV track) are doing, i.e. when they go forward, backwards, and brake, as well as tracking the distance traveled by the AEV using ‘marks’.  The sensor’s ability to record and send the amount of marks that the AEV has traveled allows us to program the AEV using the Arduino to travel a certain distance measured by marks.  By using marks to measure distance and recording these marks using the reflectance sensors, it provides us with an efficient and reliable way of knowing how far the AEV will travel and eliminates the excessive testing on the motors that would have needed to be done to try and predict the distance in which our AEV would travel.  Without the sensors, we would be unable to precisely measure the distance traveled by our AEV and therefore would be unable to reliably program the AEV to travel a certain distance– they are extremely important in completing MCR.