Arduino Code Functions

Function Name: brake(m);

Parameters:

  • m – the motor number that is being called. (e.g. 1-for motor 1, or 4-for all motors)

Function: This function cut power to the specified motor(s).

 

Function Name: celerate(m,p1,p2,t);

Parameters:

  • m – the motor number that is being called. (e.g. 1-for motor 1, or 4-for all motors)
  • p1 – start percentage power (e.g. 15)
  • p1 – end percentage power (e.g. 45)
  • t – time duration in seconds (e.g. 5)

Function: The celerate function accelerates and decelerates the specified  motor, that is called, from specified percent to another over a certain time period.

 

Function name: goToAbsolutePosition(n)

Parameters:

  • n – is the number of marks relative to the initial start position

Function: This function is used to move the AEV the specified marks from the initial start position.

 

Function Name: goFor(t);

Parameters:

  • t – time duration in seconds (e.g. 5)

Function: This function runs all motors at the power they are initialized, by the motorSpeed function, for a specified amount of seconds.

 

Function name: motorSpeed(m,p);

Parameters:

  • m – the motor number that is being called. (e.g. 1-for motor 1, or 4-for all motors)
  • p – percent power (e.g. 25)

Function: This function tells the specified motor(s) which percent power at which to travel.

 

Function name: motorSpeed(m,p);

Parameters:

  • m – the motor number that is being called. (e.g. 1-for motor 1, or 4-for all motors)
  • p – percent power (e.g. 25)

Function: This function tells the specified motor(s) which percent power at which to travel.

 

Function name: reverse(m);

Parameters:

  • m – the motor number that is being called. (e.g. 1-for motor 1, or 4-for all motors)

Function: This function reveres the specified motor(s).