Concept: Wait1Msec

Printer-friendly version
Definition: 

 

  • Function Syntax: wait1Msec( [int] time );
  • Usage: Put task in idle state for a number (parameter1) of milliseconds.

U1L1-Wait1Msec

We look at this function first because it is the most simple function that has all four elements of a function. Let's look at each element in turn.

  1. Function Name - This name allows the RobotC compiler look in its' library of functions and add the correct commands to the compiled program.
  2. Parameter - This Data controls the function. Wait1Msec requires an integer from 1 to 32,767. What this data does depends on the function that you are using. The number of parameters vary depending on the function.
  3. Encapsulation - Marks the start and stop of the parameter(s). All functions must have the encapsulation parentheses, even when there are no parameters.
  4. End Marker - The semicolon marks the end of the command. Because while space is ignored, semicolons are used to separate instructions.