Arduino Codes

Description:

Arduino codes are list of  function that makes the AEV  move from one point to one point. The list of basic function calls and their definition  used in the project are as follows :

motorSpeed(m,p); %Initializes motor(s) m at percent power p.

celerate(m,p1,p2,dt); % Accelerates or decelerates motor(s) m from start speed (%) p1 to end speed (%) p2 over the                                                 duration of dt seconds.

goFor(dt); %Runs the motor(s) at their initialized state for dt seconds.

brake(m); %Brakes motor(s) m. It cuts the power supplied.

reverse(m); %Reverses the polarity of motor(s) m.

goToRelativePosition(m); %Repeats the function prior to it until the sensor counts a specified number of marks
(m) from the relative number of marks the function was called at.

goToAbsolutePosition(c); %Repeats the function prior to it until the sensor counts a specified number of marks
(c) from the AEV’s starting position of zero marks.

rotateServo(ϴ) – Rotates the servo arm to a specified angle (ϴ).