Converting an IQ (2nd gen) project to use with an IQ (1st gen) Brain

While working with VEX IQ, you may want to run a project that was configured for a (2nd generation) Brain on a robot with a (1st generation) Brain. To do this, you will need to convert your project from '2nd gen' to '1st gen' in VEXcode IQ.

1st_gen.png

In some scenarios, minor changes are automatically made to the code or configuration during a conversion, and these changes will not affect how your project runs on an IQ (1st gen) Brain. However, there are some circumstances where changes are made to a project during conversion that require the project to be updated in order to run on a robot with a (1st gen) Brain.

This article will cover the following:


Converting a Project with External Gyro - No Changes to Code

device_icon.gen2.png

Open a (2nd generation) project in the workspace. Then, select the Devices window icon.

select_the_first_gen_button.png

Once the Devices window is open, select the '1st gen' icon.  

1st_gen_highllightblue.png

The '1st gen' icon will highlight in blue to show that the project has been converted. You can now run this project on a (1st gen) Brain.

Note: In this example the external Gyro is configured for port 4 and no updates need to be made. If you were to convert back to a 2nd gen project, there is a step where you would need to confirm this configuration. See this article for more information. 


Converting a Project with Brain Inertial Configured - No Changes to Code

If the Brain Inertial is configured in the IQ (2nd gen) project, you will need to update to either configure for an external Gyro sensor, or no Gyro. 

device_icon.gen2.png

Open a (2nd generation) project in the workspace. Then, select the Devices window icon.

select_1st_gen_bI.png

Once the Devices window is open, select the '1st gen' icon.

2nd_gen_project_needs_to_e_converted.png

A message will appear to alert you that the project will need to be converted. Select 'Continue' to proceed with the conversion.

project_conversion_completed._inertial_sensor_config_has_been_removed.png

A conversion completion message will open alerting you that the Brain Inertial sensor configuration has been removed. It will also list any changes that were made. See below for more information on hot to interpret dialog box messages.

Select 'OK" to proceed.

 

1st_gen_no_gyro.png

The '1st gen' icon will highlight in blue to show that the project has been converted. You can now run this project on a (1st gen) Brain.

You will either need to configure an external Gyro, or proceed with no Gyro configured.


Converting a Project with Changes to Code

select_device_icon2-1.png

Open a (2nd generation) project in the workspace. Then, select the Devices window icon.

select_1st_gen.png

Once the Devices window is open, select the '1st gen' icon.

Screen_Shot_2021-09-22_at_3.20.03_PM.png

A message will appear to alert you that the project will need to be converted. Select 'Continue' to proceed with the conversion.

Note: This message will only open if changes will be made to the project code.

select_ok_conversion.png

A conversion completion message will open and list any changes that were made. In this example, the {When Brain button} event block dropdown menu was updated from 2nd to 1st generation configuration.

  • See the section below for more information on the different messages that you may receive, and how to interpret them.

Select 'OK' to save the project conversion.

1st_gen_icon.png

The '1st gen' icon will be highlighted in blue to show that the project has been converted. You can now run this project on a (1st generation) Brain.


Interpreting Dialog Messages when Converting Projects

If there was a change to the code needed due to any of the conditions shown below, the message after conversion will be: "Project conversion has been completed with these changes," followed by a list of any changes that were made to the code. Below are the changes that you may encounter when converting a (2nd generation) project to run on a (1st generation) Brain.

Dialog Messages for Changes Made Automatically

{When Brain button} Dropdown Menu Updated

brain_button_event.png

{When Brain button} Dropdown Menu Updated

Here the message tells you that the conversion is completed, and the dropdown menu of the {When Brain button} block has been updated.

arrow_button_menu_changes.png

Because the Arrow buttons on the (2nd gen) Brain are 'Left' and 'Right', but they are 'Up' and 'Down' on the (1st gen) Brain, the parameters in the dropdown menu for the Blocks connected to the Arrow buttons have to be updated.

Dropdown Menu Updated

brain_button_sensing.png

This message tells you that the dropdown menu of the <Brain button pressed> block has been updated during the conversion.

sensor_block_menu.png

Because the Arrow buttons on the (2nd gen) Brain are 'Left' and 'Right', but they are 'Up' and 'Down' on the (1st gen) Brain, the parameters in the dropdown menu for the Blocks connected to the Arrow buttons have to be updated.

Project Slot Changed

project_slot.png

Here the message tells you that the Project Slot has been changed during the conversion. 

slot_update.png

An IQ (1st generation) Brain is only configured with 4 slots for user projects, while a (2nd generation) Brain is configured with 8 slots. A project configured for slots 5 - 8 will automatically be reconfigured for Slot 4.  

Dialog Messages for Changes that Require Code to Be Updated

Drivetrain Inertial Sensor Removed

inertial_sensor.png

This dialog message tells that the Drivetrain Inertial Sensor configuration has been removed during the conversion.

select_gyro_or_inertial_sensor.png

If a project is configured with the Inertial Sensor that is built into the (2nd generation) Brain, the Inertial Sensor will be removed from the Drivetrain configuration in order to be compatible with the (1st generation) Brain.

  • You may need to configure a Gyro Sensor for your project to run as desired on the (1st generation) Brain.

Some {When started} blocks have been disabled

some_when_start.png

This message tells you that some {When started} blocks have been disabled during the conversion.

when_started.png

A (1st generation) Brain can only support up to 3 {When started} blocks, while the (2nd generation) Brain supports up to 8. If there are more than 3 {When started} blocks in the (2nd generation) project, the additional {When started} block(s) will be disabled during the conversion process. You will not be able to enable the extra when started while in gen 1 mode.

Note: The software will prioritize {When started} blocks from the top left corner of the Workspace.

Note: If the project is converted back to 2nd generation, these blocks will not automatically be enabled. You will have to enable them manually in the Workspace.


IQ (2nd generation) Specific Blocks Disabled

iq_specific_blocks.png

This message lets you know that any blocks specific to IQ (2nd generation) have been disabled.

block_disabled.png

If blocks are disabled, they will not run in a project. It may be necessary to update the project so that it runs as desired.

Additionally, if block parameters are set for IQ (2nd generation)-specific configurations as shown on the left, the block will be disabled in the conversion.  This block can be enabled after the conversion by changing the 'BrainInertial' parameter in the drop down window.

Note: If the project is then converted back to 2nd generation, these blocks will not automatically be enabled. You will have to enable them manually in the Workspace. You will not be able to re-enable blocks that are specific to the IQ (2nd gen) Brain. 

2nd_gen_spec.png

The blocks shown on the left are examples of IQ (2nd generation)-specific blocks: Draw and Inertial Sensing blocks. These blocks will be disabled if they are in a project that is being converted to 1st generation. 

  • Note: There are some blocks that are shared between the Gyro and Brain Inertial Sensor. If you use those blocks and have the gyro selected, they will not be disabled. Only blocks that have the 'BrainInertial' selected will be disabled.

enable_monitor_console.png

Because the Console View is not supported for IQ (1st generation), any blocks that have the 'Console' option selected in the menu will be disabled when converting to a 1st gen project.

These blocks can be enabled if the menu option is changed.  In the examle on the left, the [Print] block is disabled because 'Console' is selected.

The block can be enabled by selecting the 'Brain' option, since this option is supported. 

all_msgs.png

A single project may have multiple changes. VEXcode will make all of the conversions at once and list all changes in a single message — as shown on the left.