Knowledge Base

Using the External IDE

Battery_Raid_logo_hires.png

FIRST_I_srael.png In partnership with FIRST Israel

It is possible, and advantageous, to use an external code editor to write your Python code. Advantages include:

  • IDE allow the use of Python 3 (the internal CoderZ editor uses 2.7)
  • Better performance, since the code and the simulation run as two seperate processes.
  • You can use whichever IDE you are most comfortable using.

 

To connect the external code with the CoderZ Platform, follow these steps:

  1. Install the CoderZ package using the following command:
    (Note: this step should be only done once, before you begin writing code for your missions)
    python3 -m pip install coderz
  2. If you have already installed the package in the past, make sure you have the latest version by uninstalling and re-installing it:
    pip3 uninstall coderz
    python3 -m pip install coderz
  3. After installation, create a file with the following code:
    from coderz import Server
    import time

    Server.start()
    robot = Server.get_robot()

    # ######### Your code goes here:



    # ##########

    Server.stop()
  4. If you run this code, you will see an output with all the commands you can use to communicate with your robot in CoderZ.
  5. Edit the code as needed. 
  6. In the CoderZ platform, within the specific mission, click the IDE icon:
    mceclip0.png
  7. This should establish connection and your code will run automatically.
  8. To stop the execution of your code, you should terminate the Python process (i.e., ctrl+C)

 

If you have any questions, please contact support.

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

Please sign in to leave a comment.

Powered by Zendesk