Configuring 3-Wire Devices in VEXcode V5

When starting to program with VEXcode V5, Sensor and 3-Wire device blocks will not appear in the Toolbox until they have been configured.


Adding a 3-Wire Device

VEXcode V5 Toolbar with the Devices icon highlighted in between the Code Viewer and Print Console icons.

To configure a device, select the Devices button to open the Devices window.

VEXcode V5 Devices menu with the Add a device button shown.

Select “Add a device.”

VEXcode V5 Devices menu after the Add a device button has been selected. The 3 Wire option is highlighted.

Select the 3-wire Devices.

VEXcode V5 Devices menu after the 3 Wire device option has been selected. There is a menu of 3-Wire Devices shown, and the Limit Switch option is highlighted.

Select the 3-wire Device that you are using. This example shows a Limit Switch.

Note: 3-wire Devices include the Limit Switch, Bumper Switch, Encoder, Range Finder, Line Tracker, Light, Potentiometer, LED, Gyro, Motor-393, Servo, Accelerometer-2G, and Accelerometer-6G. All devices follow the same configuration process with an additional step for Motor-393. See the bottom of this article for more details. 

VEXcode V5 Devices menu after setting the new device's port to E. Below, the Done button is highlighted.

Select which port the device is attached to on the VEX V5 Brain. Ports that are already configured for other devices will be unavailable. Once the port has been selected, select “Done” to submit the device to the configuration or “Cancel” to return back to the Devices menu.

Note: Selecting “Cancel” will undo any changes you have made to the device and will not be a part of the configuration.


Changing a 3-Wire Device’s Port

VEXcode V5 Devices menu with the previously added Limit Switch shown.

You can change the port number for the 3-Wire Device by selecting the 3-Wire Device in the Devices window.

VEXcode V5 Devices menu after changing the device's port to D. The D port option is now colored green. Below, the Done button is highlighted.

Select a different port on the Port Selection screen and the port number will turn green. Then select "Done" to submit the change.


Renaming a 3-Wire Device

VEXcode V5 Devices window with the Limit Switch options shown. Above, the device's name is highlighted to indicate that it can be renamed.

You can also rename the 3-Wire 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.

VEXcode V5 When limit block is shown with the Limit Switch dropdown menu open. The Limit Switch's new device name is shown in the dropdown menu.

If you change the name of 3-Wire 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 3-Wire Device

VEXcode V5 Devices window with the Limit Switch options shown. Below, the Delete button is highlighted.

3-Wire Devices can also be deleted by selecting the “Delete” option at the bottom of the Port Selection screen.

Note: If you delete a 3-Wire 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.


Configuring a VEX Motor-393

VEXcode V5 Devices menu after the 3 Wire device option has been selected. There is a menu of 3-Wire Devices shown, and the Motor 393 option is highlighted.

Select the VEX Motor-393 from the list of devices.

VEXcode V5 Devices menu after setting the new device's port to H. Below, the Done button is highlighted.

Select a port for the Motor-393.

VEXcode V5 Devices menu after selecting the Smart Port and with the Motor 393 options shown. The options can be used to rename each of the Motor's directions or reverse its orientation.

After selecting the port, this option screen will let you configure Motor-393 further by:

  • Changing the name
  • Changing the port
  • Changing the direction

For more information on these additional configurations, see the options below.

VEXcode V5 Devices window with the Motor 393 options shown. Above, the device's name is highlighted to indicate that it can be renamed.

Changing the name of Motor-393.

VEXcode V5 Devices window with the Limit Switch options shown. Above, the device's Smart Port icon is highlighted to indicate that it can be selected and changed.

Changing the port of Motor-393.

VEXcode V5 Devices window with the Motor 393 options shown. Below, the Reverse Motor option is selected and highlighted. This button can be used to reverse the Motor's spin direction.

Changing the direction of Motor-393.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: