AEV Project Glossary

Arduino Code Glossary

Here are some of the programing basics needed for coding in Arduino programming interface. These codes give command to AEV in order for it to execute the correct assigned behaviors such as accelerating, braking, and etc.

  • brake(m);
    • variables
      • m : motor number 1, 2, 3 (4 for all)
    • description
      • cut off the power supply to Arduino, note that the motor does not stop instantly
  • celerate(m,p1,p2,t);
    • variables
      • m: motor 1, 2,3 (4 for all)
      • p1: start speed in % (0-100)
      • p2: end speed in % (0-100)
      • t: time of duration (in seconds)
    • description
      • give selected motor(s) a starting and an ending speed and its duration time
  • goFor(t);
    • variables
      • t: time (in seconds)
    • description
      • give the previous code its duration time
  • goToRelativePosition(m)
    • variables
      • m: marks, AKA wheel count number (8 per wheel revolution, 3.9 inch diameter wheel, 0.4875 inches/mark
    • description
      • Continues the previous command for “m” marks relative to the vehicle’s CURRENT position. “m” can be a positive or negative value
  • goToAbsolutePosition
    • variables
      • m: marks, AKA wheel count number (8 per wheel revolution, 3.9 inch diameter wheel, 0.4875 inches/mark
    • description
      • Continues the previous command for “m” marks relative to the vehicle’s STARTING position. “m” can be a positive or negative value
  • motorSpeed(m,p);
    • variables
      • m: motor,1,2,3 (4 for all)
      • p: start speed in % (0-100)
    • description
      • give selected motor(s) a starting speed
  • reverse(m);
    • variables
      • m: motor number 1, 2, 3 (4 for all)
    • description
      • change the selected motor(s) polarity
  • rotateServo(a);
    • variables
      • a = angle of rotation for servo (0.00 to 180.00 degrees)
    • description
      • Rotates a servo between 0 and 180 degrees
  • getVehiclePostion();
    • variables
      • none
    • description
      • Returns the AEV’s position in marks
  • getTotalMarks();
    • variables
      • none
    • description
      • Returns the total number of marks the AEV has traveled
  • getForwardsTotal();
    • variables
      • none
    • description
      • Returns the total number of marks the AEV has traveled in the forward direction only
  • getBackwardsTotal
    • variables
      • none
    • description
      • Returns the total number of marks the AEV has traveled in the backwards direction only
  • getVehicleDirection();
    • variables
      • none
    • description
      • Returns the direction the AEVE is currently set to travel (polarity of motors)
  • reflectanceSensorTest();
    • variables
      • none
    • description
      • used to check if the sensor is working properly at the beginning of every and each lab