Configuring the GPS Sensor in VEXcode V5

When starting to program with VEXcode V5, blocks for the GPS Sensor will not appear in the Toolbox until it has been configured.

gps_sensor.jpeg

The following article will cover:


Adding the GPS Sensor as a Device in VEXcode V5

With VEXcode V5, configuring the GPS Sensor is accomplished by using the ‘Add a device’ feature. To provide an example of this, the following steps will add the GPS Sensor as a device within VEXcode V5.

Select_Devices.png

Select the Devices icon.

Select_Add.png

Select ‘Add a device.’

gps_icon.png

Select ‘GPS.’

select_port.png

Select the Smart Port that the GPS Sensor is plugged into on the V5 Robot Brain.

dropdown_callout.png

There is an option to change the X, Y and Angle offsets, adjust the offsets depending on the design of your robot.

For more information about how to determine your robot's offset, view this article from the Knowledge Base.

done.png

Once the port is chosen and the offsets have been adjusted, select ‘DONE'.

gps_sensing_blocks.png

Once the GPS sensor has been added to your user program, a new set of sensor commands will become available.

For more information on the commands from the ‘Sensing’ category pertaining to the GPS Sensor, view the Help information (Blocks project or Python project).


Changing a GPS Sensor's Port Number

gps_in_window.png

You can change the port number for the device by selecting it in the Devices window.

renamed_device.png

Select the port icon in the top right, then select a different port on the Port Selection screen and the port number will turn green. Then select ‘Done’ to submit the change.

port_change_dropdown.png

If you change the port of a device that is already being used in your project, you will need to update the device's name in the block to the new name using the drop down.


Renaming a GPS Sensor

gps_rename.png

You can rename the device by changing the name in the text box at the top of the Port Selection screen. If you select an invalid name, the text box will highlight red to indicate. Then select ‘Done’ to submit the device changes to the configuration.

Note: for more information about naming rules for variables and devices, view this article from the Knowledge Base.

rename_dropdown.png

If you change the name of a device that is already being used in your project, you will need to update the device's name in the block to the new name using the drop down.


Deleting a GPS Sensor

delete.png

The device can be deleted by selecting the ‘Delete’ option at the bottom of the Offset screen.

Note: If you delete a device that is already being used in your project, your project will generate an error if you try to download it until you also delete the blocks that were using the deleted device.