Starting, Downloading, and Running a Python Project in VEXcode IQ

Starting and downloading Python projects in VEXcode IQ is easy.


How to Start a Python Project

Screenshot of the VEX IQ blocks interface, showcasing various programming blocks used for coding VEX IQ robots in Python, highlighting features for educational robotics projects and tutorials.

Launch VEXcode IQ. The platform defaults to the Blocks interface.

Screenshot of a VEX IQ Python tutorial project, showcasing code snippets and programming elements for beginner robotics enthusiasts, aimed at enhancing understanding of VEX IQ system and its components.

Select ‘File,’ then ‘New Text Project’ to open the text interface.

Screenshot of the VEX IQ platform language selection menu, showing options for programming languages available in the Python tutorials section of the VEX knowledge base.

Next, select the Python project language. There is the option to start a new project in either C++ or Python.

Note: Currently, only IQ (2nd gen) electronics are compatible with Python projects.

Screenshot of the Python interface for VEX IQ Robotics, showcasing programming elements and tools used for educational robotics projects, as part of the Python Tutorials section in the VEX IQ knowledge base.

The Python interface will open.


How to Build a Python Project

This section will show you how to create a basic Python project using commands from the Tool Box. The project outlined here will drive the IQ (2nd gen) BaseBot forward for 200 millimeters (mm).

Screenshot of Python tutorials for VEX IQ Robotics, showcasing various coding examples and resources to help beginners learn programming concepts and enhance their robotics projects.

Select ‘File’ then ‘Open Examples” to open a template project.

Example project diagram for VEX IQ Basebot with 2-motor drivetrain, illustrating components and layout for Python programming tutorials.

Select the Basebot (Drivetrain 2-motor) template. Templates are blank projects with preset device configurations.

Screenshot displaying a warning message about unsaved projects in VEXcode IQ, emphasizing the importance of saving work while programming robots with the VEX IQ platform.

If your project was not saved, the 'Save now' window will appear before the Example Project opens in the workspace.

Select 'Save' if you you want to save your previous project, otherwise select 'Discard.'

Screenshot of VEX IQ commands in workspace, showcasing available programming options and features for Python tutorials, aimed at enhancing robotics education and project development for beginners.

Notice that a set of project comments open in the workspace. You will add commands after the comments.

Screenshot of a VEX IQ project code example, showcasing programming elements and structure for beginners in Python tutorials, aimed at enhancing understanding of robotics concepts within the VEX IQ platform.

Select enter at the end of the last line of code (line 46). This should create the next numbered line (line 47). This is where you will start adding code to the project.

Screenshot showing how to drag and drop code blocks in VEXcode IQ for programming VEX IQ robots, illustrating a step in the Python tutorials for beginners.

Now you can add commands from the Toolbox. Select the Drive for command.

Screenshot of a Python programming interface for VEX IQ, showcasing code examples and commands for controlling a robot, as part of the educational resources in the VEX IQ Robotics platform.

Drag the Drive for command into the workspace and place it on the last line of the project (line 47).


How to Download and Run a Python Project

VEX IQ Robotics project name box, featuring a user interface for entering and displaying project names, designed for educational purposes and beginner robotics enthusiasts in the context of Python tutorials.

First, name and save your Python project. View one of the following articles for detailed information on how to save a VEXcode IQ Python project:

Screenshot of the VEX IQ Robotics platform interface showing the selection of the 'Brian' slot in a Python tutorial, illustrating programming options for educational robotics projects.

Then, choose which of the Brain’s slots you will download the project to. To do this, select the ‘Slot’ button on the Toolbar.

Icon representing brain or intelligence, associated with VEX IQ Robotics platform tutorials, highlighting educational resources for programming and building robots using VEXcode IQ.

Next, connect the Brain to your device (Directly via Micro-USB, USB-C or via VEX Controller. View this section of the Knowledge Base to learn more about connecting an IQ Brain to VEXcode IQ) and check that the Brain icon is green.

Download icon for VEX IQ Python tutorials, representing resources and documentation for educators and students on programming and robotics concepts using the VEX IQ platform.

Select the ‘Download’ button to download the project to the Brain. The project will download to the chosen slot.

Icon representing the 'Run' command in VEXcode IQ, used in Python tutorials for the VEX IQ Robotics platform, which supports educational robotics learning and programming.

Finally, select ‘Run’ to start the project while the robot is still connected to your computer.

VEX IQ Drive Forward Program graphic illustrating key components and concepts for programming robots using Python, aimed at educational purposes and beginner robotics enthusiasts.

Or, disconnect the Brain from your device and run the project on the IQ Brain.

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

Last Updated: