Robot Specific Python#

All standard VEXcode VR commands are available for use in the V5RC Virtual Skills - High Stakes Playground.

Motion#

motor.spin()#

The motor.spin(direction) command is used to spin a motor indefinitely.

This is a non-waiting command and allows any subsequent commands to execute without delay.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.spin(direction).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

direction

The direction for the motor to move in: FORWARD or REVERSE.

Returns: None.

# Lift the Arm up before moving.
arm_motor.spin(FORWARD)
wait(1, SECONDS)
arm_motor.stop()

motor.spin_for()#

The motor.spin_for(direction, distance, units, wait) command is used to spin a motor for a given amount of degrees or turns.

This is can be a non-waiting or waiting command depending on if the wait parameter is used.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.spin_for(direction, distance, units, wait).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

direction

The direction for the motor to move in: FORWARD or REVERSE.

distance

The distance for the motor to move as an integer.

units

The units that the motor will use: DEGREES or TURNS.

wait

Optional. The wait parameter determines whether the command will block subsequent commands (wait=True) or allow immediate execution (wait=False). If unspecified, the default for the wait parameter is wait=True.

Returns: None.

# Lift the Arm up before moving.
arm_motor.spin_for(FORWARD, 400, DEGREES)

motor.spin_to_position()#

The motor.spin_to(angle, units, wait) command is used to spin a motor to a given position.

This is can be a non-waiting or waiting command depending on if the wait parameter is used.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.spin_for(angle, units, wait).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

angle

The specific angle or number of turns that the motor will spin to.

units

The units that the motor will use: DEGREES or TURNS.

wait

Optional. The wait parameter determines whether the command will block subsequent commands (wait=True) or allow immediate execution (wait=False). If unspecified, the default for the wait parameter is wait=True.

Returns: None.

# Lift the Arm up before moving.
arm_motor.spin_to_position(400, DEGREES)

motor.stop()#

The motor.stop() command is used to stop a motor.

This is a non-waiting command and allows any subsequent commands to execute without delay.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.stop().

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Returns: None.

# Lift the Arm up before moving.
arm_motor.spin(FORWARD)
wait(1, SECONDS)
arm_motor.stop()

motor.set_position()#

The motor.set_position(position, units) command is used to set a motor’s encoder position to the given position value.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.set_position(position, units).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

position

The specific integer for the Motor’s encoder to be set to.

units

The units for the motor to use: DEGREES or TURNS.

Returns: None.

# Make the raised Arm as the new 0 degrees position.
arm_motor.spin_to_position(400, DEGREES)
arm_motor.set_position(0, DEGREES)

motor.set_velocity()#

The motor.set_velocity(velocity, units) command is used to set the speed of a motor.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.set_velocity(velocity, units).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

velocity

The speed that the Motor will spin at, ranging from -100 to 100.

units

The unit for the Motor’s velocity, PERCENT.

Returns: None.

# Lift the Arm up before moving.
arm_motor.set_velocity(100, PERCENT)
arm_motor.spin_to_position(400, DEGREES)

motor.set_timeout()#

The motor.set_timeout(value, units) command is used to set a time limit for a motor’s movement commands.

This prevents motion commands that do not reach their intended position from preventing subsequent commands from running.

This is a non-waiting command and allows any subsequent commands to execute without delay.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.set_timeout(value, units).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

value

The amount of time the motor will wait before stopping.

units

The unit for the Motor’s timer, SECONDS.

Returns: None.

# Lift the Arm up before moving.
arm_motor.set_timeout(1, SECONDS)
arm_motor.spin_for(FORWARD, 3, TURNS)

Events#

front_optical.object_detected()#

front_optical.object_detected(callback) is the same command as eye.object_detected(callback).

The command only uses Axel’s Optical Sensor front_optical to replace eye in the standard command.

For information on how to use the eye.object_detected(callback) command, go to its API documentation here.

front_optical.object_lost()#

front_optical.object_lost(callback) is the same command as eye.object_lost(callback).

The command only uses Axel’s Optical Sensor front_optical to replace eye in the standard command.

For information on how to use the eye.object_lost(callback) command, go to its API documentation here.

Sensing#

motor.is_done()#

The motor.is_done() command is used to return a True or False value if the selected motor has completed its movement.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.is_done().

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Returns: This returns a Boolean value.

motor.is_spinning()#

The motor.is_spinning() command is used to return a True or False value if the selected motor is moving.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.is_spinning().

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Returns: This returns a Boolean value.

motor.position()#

The motor.position(units) command is used to return the current rotational position of the selected motor.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.position(units).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

units

The unit of the returned value, DEGREES or TURNS.

Returns: This returns a numerical value.

# Make the raised Arm the new 0 degrees position.
arm_motor.spin_for(FORWARD, 400, DEGREES)
arm_motor.set_position(0, DEGREES)
brain.screen.print(arm_motor.position(DEGREES))

motor.velocity()#

The motor.velocity(units) command is used to return the current velocity of the selected motor.

To use this command, replace motor with the desired motor or motor group, for example: arm_motor.velocity(units).

Objects

Description

arm_motor

Raises or lowers Axel’s Arm.

pusher_motor

Raises or lowers the Pusher to push Rings off the Arm.

Parameters

Description

units

The unit of the motor’s velocity, PERCENT.

Returns: This returns a numerical value.

# Lift the Arm up before moving.
arm_motor.set_velocity(100, PERCENT)
arm_motor.spin_to_position(400, DEGREES)

ai_objects = ai_vision.take_snapshot()#

The ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement captures the current image from the AI Vision Sensor and analyzes it for all AI Classifications. Identified classifications are stored in an array. While ai_objects is the default array name used in VEXcode toolbox commands, you can customize this name as needed.

Important: You will need to lift the Arm of the robot for the AI Vision Sensor to be able to get a clear snapshot of the Playground.

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This statement returns an array of detected AI Classifications and their properties, sorted by their area from largest to smallest.

In this example, a snapshot will be taken, and the Center X and Y coordinates of the largest AI Classification will be printed to the Print Console repeatedly.

# Lift the Arm to not block the AI Vision Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)
while True:
    brain.screen.clear_screen()

    # Take a snapshot with the AI Vision Sensor with the specified
    # signature and store the object data into a variable
    # "ai_objects".
    ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

    # Use the len() function to check if the array is empty before
    # pulling any data from the array.
    if len(ai_objects) is not 0:
        # If yes, print the data of the largest AI Classification.
        brain.screen.print("Center X: ", ai_objects[0].centerX)
        brain.screen.next_row()

        brain.screen.print("Center Y: ", ai_objects[0].centerY)
        brain.screen.next_row()

    else:
        brain.screen.print("No object detected.")
            
    # Take a new snapshot every 0.2 seconds.
    wait(0.2, SECONDS)

ai_objects[0].id#

The ai_objects.id property returns the specified index’s id.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

Each object has an id property that identifies its type. The possible id values are:

  • Mobile Goal: 0

  • Red Ring: 1

  • Blue Ring: 2

You can also compare the id directly with these predefined constants:

  • Mobile Goal: GameElements.MOBILE_GOAL

  • Red Ring: GameElements.RED_RING

  • Blue Ring: GameElements.BLUE_RING

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s id as an integer.

In this example, the AI Vision Sensor will take a snapshot, then check if the largest AI Classification detected is a Mobile Goal.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into
# a variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is empty
# before pulling any data from the array.
if len(ai_objects) is not 0:
# If the array is not empty, check if the largest
# AI Classification is a Mobile Goal.
    if ai_objects[0].id == GameElements.MOBILE_GOAL:
        brain.screen.print("This is a Mobile Goal.")
    else:
        brain.screen.print("This is not a Mobile Goal.")

ai_objects[0].centerX#

The ai_objects.centerX property returns the specified index’s X coordinate of the AI Classification’s exact center.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

The AI Vision Sensor’s screen dimensions are 320 pixels wide and 240 pixels high and the precise center of the AI Vision Sensor’s screen corresponds to the coordinates (160, 120).

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s center X coordinate as an integer.

This example will take a snapshot and print the center X coordinate of the largest AI Classification.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into a
# variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is empty
# before pulling any data from the array.
if len(ai_objects) is not 0:
    brain.screen.print(ai_objects[0].centerX)

ai_objects[0].centerY#

The ai_objects.id property returns the specified index’s Y coordinate of the AI Classification’s exact center.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

The AI Vision Sensor’s screen dimensions are 320 pixels wide and 240 pixels high and the precise center of the AI Vision Sensor’s screen corresponds to the coordinates (160, 120).

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s center Y coordinate as an integer.

This example will take a snapshot and print the center Y coordinate of the largest AI Classification.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into a
# variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is empty
# before pulling any data from the array.
if len(ai_objects) is not 0:
    brain.screen.print(ai_objects[0].centerY)

ai_objects[0].originX#

The ai_objects.id property returns the specified index’s X coordinate of the AI Classification’s top-leftmost corner.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

The AI Vision Sensor’s screen dimensions are 320 pixels wide and 240 pixels high and the precise center of the AI Vision Sensor’s screen corresponds to the coordinates (160, 120).

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s origin X coordinate as an integer.

This example will take a snapshot and print the origin X coordinate of the largest AI Classification.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into
# a variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is
# empty before pulling any data from the array.
if len(ai_objects) is not 0:
    brain.screen.print(ai_objects[0].originX)

ai_objects[0].originY#

The ai_objects.id property returns the specified index’s Y coordinate of the AI Classification’s top-leftmost corner.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

The AI Vision Sensor’s screen dimensions are 320 pixels wide and 240 pixels high and the precise center of the AI Vision Sensor’s screen corresponds to the coordinates (160, 120).

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s origin Y coordinate as an integer.

This example will take a snapshot and print the origin Y coordinate of the largest AI Classification.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into
# a variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is
# empty before pulling any data from the array.
if len(ai_objects) is not 0:
    brain.screen.print(ai_objects[0].originY)

ai_objects[0].width#

The ai_objects.id property returns the specified index’s width in pixels.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s width as an integer.

This example will take a snapshot and print the second largest AI Classification’s width.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into a
# variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is empty
# before pulling any data from the array.
if len(ai_objects) is not 0:
    brain.screen.print(ai_objects[0].width)

ai_objects[0].height#

The ai_objects.id property returns the specified index’s height in pixels.

An array must be created first using the ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS) statement before this property can be used.

After creating an array of AI Classifications, you can access specific objects and their properties using their index. The array is sorted by object area, from largest to smallest, with indices starting at 0. This means ai_objects[0] represents the largest detected object, while the highest index represents the smallest.

All subsequent AI Vision Sensor commands rely on data from the most recent snapshot taken. To ensure you’re working with the most up-to-date information, it’s important to take new snapshots regularly. Each new snapshot refreshes the data available to all AI Vision Sensor commands, allowing them to process the latest visual information from the sensor’s environment.

Before attempting to access data stored from the last snapshot, you should always check if your array is not empty. You can use the len() function to verify this. If len() returns 0, the array is empty and contains no data from the last snapshot.

if len(ai_objects) is not 0:

Returns: This property returns the specified index’s width as an integer.

This example will take a snapshot and print the second largest AI Classification’s height.

# Lift the Arm by 350 degrees to not block the AI Vision
# Sensor's field of view.
arm_motor.spin_for(FORWARD, 350, DEGREES)

# Take a snapshot with the AI Vision Sensor with the
# specified signature and store the object data into a
# variable "ai_objects".
ai_objects = ai_vision.take_snapshot(AiVision.ALL_AIOBJS)

# Use the len() function to check if the array is empty
# before pulling any data from the array.
if len(ai_objects) is not 0:
    brain.screen.print(ai_objects[0].height)

front_optical.is_near_object()#

The front_optical.is_near_object() command is used to report a Boolean value if the Optical Sensor is close enough to an object to detect a color.

Returns: This reports a Boolean value.

# Print if the Front Optical Sensor is detecting an object.
brain.screen.print(front_optical.is_near_object())

front_optical.color()#

The front_optical.color() command is used to return the color detected by an Optical Sensor.

This is a non-waiting command and allows any subsequent commands to execute without delay.

The following colors can be used as a comparison to the color detected by an Optical Sensor:

  • RED

  • GREEN

  • BLUE

  • YELLOW

  • ORANGE

  • PURPLE

  • CYAN

Returns: This returns the name of the detected color as a string.

# Identify the color of the ring on the Arm.
brain.screen.print(front_optical.color())

front_optical.brightness()#

The front_optical.brightness() command is used to report the amount of light detected by an Optical Sensor within a range of 0 to 100 percent.

Returns: This returns a numeric value.

# Lift the Arm by 350 degrees to not block the Optical Sensor.
arm_motor.spin_for(FORWARD, 350, DEGREES)


brain.screen.print(front_optical.brightness())

front_optical.hue()#

The front_optical.brightness() command is used to report the hue of the object detected by an Optical Sensor within a range of 0 to 359. This number represents the location of the detected color on a color wheel.

Returns: This returns a numeric value.

# Print the hue of the ring on the Arm.
brain.screen.print("Hue: ", optical.hue())

rotation.set_position()#

The pusher_rotation.set_position(value, units) command is used to sets a Rotation Sensor’s position to the given value.

Parameters

Description

value

The value to set the Rotation Sensor’s position to.

units

The unit of the set position, DEGREES.

Returns: None.

rotation.angle()#

The pusher_rotation.angle(value, units) command returns the Pusher Motor’s current angle of rotation in degrees.

Returns: An integer.

rotation.position()#

The pusher_rotation.position(units) command returns the Pusher Motor’s current position.

Parameters

Description

units

The unit of the set position, DEGREES or TURN.

Returns: An integer.

gps.x_position()#

The gps.x_position(units) command is used to report the X positional offset of a GPS Sensor or defined origin point from the center of a field.

This is a non-waiting command and allows any subsequent commands to execute without delay.

Parameters

Description

units

The unit of the offset value, INCHES or MM (Millimeters).

Returns: This returns a numeric value.

def main():
    # Print the current X positional offset of the robot.
    brain.screen.print(gps.x_position(MM))

gps.y_position()#

The gps.y_position(units) command is used to report the Y positional offset of a GPS Sensor or defined origin point from the center of a field.

This is a non-waiting command and allows any subsequent commands to execute without delay.

Parameters

Description

units

The unit of the offset value, INCHES or MM (Millimeters).

Returns: This returns a numeric value.

def main():
    # Print the current Y positional offset of the robot.
    brain.screen.print(gps.y_position(MM))

gps.heading()#

The gps.heading() command is used to report the heading that a robot is currently facing based on a GPS Sensor’s readings from the VEX GPS Field Code.

This is a non-waiting command and allows any subsequent commands to execute without delay.

Returns: This returns a numeric value.

def main():
    # Print the current heading of the robot.
    brain.screen.print(gps.heading())