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:
- 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
- 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
- After installation, create a file with the following code:
from coderz import Server
robot = Server.get_robot()
# ######### Your code goes here:
- If you run this code, you will see an output with all the commands you can use to communicate with your robot in CoderZ.
- Edit the code as needed.
- In the CoderZ platform, within the specific mission, click the IDE icon:
- This should establish connection and your code will run automatically.
- 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.