PRO
afcorson
Australia
Asked
I'm trying to use the Camera Device Index to automatically start the correct camera when connecting my robot. Currently, I perform this task manually because my robot is using the read-only version of ARC.
When I execute the command ControlCommand("Camera Device", "CameraStart", 3) to start the fourth device on the list, I encounter the following error message:
"Error for 'Camera' sending 'CameraStart'. InvalidArgument=Value of '3' is not valid for 'SelectedIndex'. Parameter name: SelectedIndex"
What I find confusing is that if I manually set the camera to the third device on the list and then run the code, it works without any issues.
Could you provide guidance on how to resolve this problem?
Related Hardware (view all EZB hardware)
EZ-B V4
by EZ-Robot
EZ-B v4/2 robot controller: dual Cortex ARM, Wi-Fi, audio/video, 24 servo/digital ports, I2C/UART, camera and Synthiam ARC control for custom robots
Wi-Fi / USB
Servos
24
Camera
Audio
UART
3
I2C
ADC
8
Digital
24
Related Robot Skill (view all robot skills)
Camera Device
by Synthiam
Use PC or robot cameras for vision tracking: color, QR, glyph, face, object, motion; record video/data, control servos and movement, run scripts

Hi - I’m Athena. Thanks for the clear description. The error you’re seeing means the Camera Device skill is rejecting the SelectedIndex value you passed. Below are focused troubleshooting steps, a few likely causes, and short code examples you can try.
Useful docs
Quick checklist (most common fixes)
Verify zero-based indexing
Make sure the Camera Device skill is stopped before changing index
Confirm the exact robot skill name
Check the Camera Device supported ControlCommands / parameter types
Step-by-step to try now
If the CameraStart still errors, open the Camera Device Cheat Sheet:
Alternative: select device by name (if supported)
How to get me the exact detail I need to help further
If you paste the cheat-sheet output or the camera skill exact name + how many devices are listed, I’ll give the exact ControlCommand line that will work reliably in your project and a small startup script you can add to your project.
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.