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

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

2nd_gen.png

In most cases, there will not be any changes to the project during the conversion. However, there are a few instances where minor changes are made automatically when certain blocks are used in a 1st generation project. These changes will not affect how your project runs on an IQ (2nd generation) Brain.


Converting a Project with No Gyro - No Changes to Code

square.evice.icon.png

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

nogyro.png

Once the Devices window is open, select the '2nd gen' icon.

converted_to_2nd_copy.png

If no Gyro was configured, the '2nd gen' icon will highlight in blue to show that the project has been converted. You can now run this project on a (2nd gen) Brain.


Converting a Project with Gyro Configured - No Changes to Code

If you have a Drivetrain with a Gyro configured, you will need to either configure the Gyro with the IQ (2nd gen) Brain, or configure the Brain Inertial Sensor that is emedded in the IQ (2nd gen) Brain.

square.evice.icon.png

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

square.select_2nd_gen.png

Once the Devices window is open, select the '2nd gen' icon.

select_continue.png

If you have a Drivetrain with a Gyro configured, you will need to manually configure the external Gyro, or configure the Brain Inertial Sensor. 

In this scenario, a conversion dialog window will open. Select 'Continue' to proceed with the conversion.

Note: If you do not have a Gyro configured, you will not get this message and your project will be converted.

select_gyro_type.png

You will be prompted to select the Gyro configuration; either Externail Gyro or Brain Inertial. Select one.

  • If External Gyro is selected, it will be configured for the same port as was previously configured.
  • If Brain Inertial is selected, your project will use the Brain Inertial Sensor embedded in the Brain, and the port will be free to use with other devices.

brain_inertial_confirmation.png

A message will appear to alert you that the project has been converted. Select 'OK' to proceed.

2nd_gen_with_intertial.png

The '2nd gen' icon will highlight in blue to show that the project has been converted. You can also see that the Brain Inertial Sensor has been configured.

You can now run this project on a (2nd gen) Brain.

Note:  If this project is converted back to 1st gen, the external Gyro will not automatically be configured. It will need to be manually configured in the Devices window.

Note: The conversion process will also start when a IQ (2nd gen) Brain is connected while VEXcode is in 1st gen mode.


Converting a Project with Minor Changes to Code Made Automatically

select_device_icon.png

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

select_2nd_gen.png

Once the Devices window is open, select the '2nd gen' icon.

select_continue.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 were 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 1st to 2nd 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.

2nd_gen_is_highlighted.png

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


Interpreting Dialog Messages when Converting Projects

If there was a conversion 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 (1st generation) project to run on a (2nd generation) Brain. 

Note: The conversion process will also start when a IQ (2nd gen) Brain is connected while VEXcode is in 1st gen mode.

{When Brain button} Dropdown Menu Updated

brain_button_event.png

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

update_when_brain_button_pressed.png

Because the Arrow buttons on the (1st gen) Brain are 'Up' and 'Down', but they are 'Left' and 'Right' on the (2nd 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

Here the message tells you that the conversion is completed, and the dropdown menu of the <Brain button pressed> block has been updated.

menu_options_change.png

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

Drivetrain Gyro Update

brain_inertial_confirmation.png

Here the message tells you that the Drivetrain Gyro Sensor was replaced with the Inertial sensor. 

inertial.png

You will see the Inertial Sensor Icon in the Devices.    
Note:  If this project is converted back to 1st gen, the external Gyro will not automatically be configured. It will need to be manually configured.

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