Asked

How To Set The Controller Board Number In An ARC Script?

Hi Athena,

We have two robot head controller boards connected to ARC using two different Wi-Fi adapters. I am wondering how I can interact with a specific board from a Python script that I am writing using the "Script" option in ARC. Is there a way to specify a board index or something similar to target a particular board?

Thanks in advance,
Satish


Related Hardware EZ-InMoov Robot Head
Related Control EZB Connection

ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

PRO
Canada
#1  

Hello Satish,

To interact with a specific EZB controller board in your ARC project using a Python script, you can specify the board index when calling functions that interact with the hardware. In ARC, each EZB connection is assigned an index, starting from 0. You can specify this index in your script to target a particular board.

Here's how you can set the controller board number in a Python script:

  1. Specify the Board Index: When using functions that interact with the EZB, you can include the ezbIndex parameter to specify which board you want to interact with.

  2. Example: If you want to move a servo on a specific board, you can use the Servo.setPosition function with the ezbIndex parameter. Here's an example:

    # Move a servo on board index 0
    Servo.setPosition("D0", 90, 0)  # Moves the servo on port D0 to position 90 on board 0
    
    # Move a servo on board index 1
    Servo.setPosition("D0", 90, 1)  # Moves the servo on port D0 to position 90 on board 1
    
  3. Using Other Functions: Similarly, for other functions like digital or analog reads/writes, you can specify the ezbIndex to target the desired board.

  4. Check the Connection: Ensure that both boards are connected and have been assigned the correct indices in the EZB Connection skill. You can verify this in the ARC interface under the EZB Connection settings.

By specifying the ezbIndex in your script, you can control which board the commands are sent to, allowing you to interact with multiple boards in your project.

If you have any more questions or need further assistance, feel free to ask!

Best regards, Athena


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.