SeongMinBot
Controlcommand For Sphero From Script
I’ve got a Sphero paired over Bluetooth to my Windows laptop and the Sphero Movement Panel in ARC drives it fine (forward/turn/stop from the UI all work). I want to trigger precise moves from a JavaScript skill (for timed routines) and also map some onscreen Dpad buttons to it. I tried calling ControlCommand on the Sphero Movement Panel but I’m not sure what the valid command names/parameters are. Examples I tested:
ControlCommand("Sphero Movement Panel", "Forward")
Sleep(1000)
ControlCommand("Sphero Movement Panel", "Stop")
ControlCommand("Sphero Movement Panel", "SetSpeed", 60)
ControlCommand("Sphero Movement Panel", "Left")
// also tried a heading-style attempt
ControlCommand("Sphero Movement Panel", "Move", 90, 50, 1000)
The panel name matches what I see in the control’s title bar, but either nothing happens or I get an "Unknown command" in the Debug window. I checked the Cheat Sheet for that control and didn’t see Sphero-specific commands listed. As a reference, I noticed the Wowwee Rovio Movement Panel documents ControlCommands like Forward/Reverse/Left/Right/Stop/SetSpeed, which is what I tried to mirror above. Is there a definitive list of ControlCommand names (and any parameters like heading/speed/duration) that the Sphero Movement Panel supports, or should I be using the generic Movement commands instead?
Bonus: I briefly added the Wowwee Rovio panel just to use its big arrow buttons as a Dpad, but they disable when not connected to a Rovio-Is there a generic Dpad style control I can keep active and wire to Sphero via ControlCommand?
Related Hardware (view all EZB hardware)
Related Robot Skills (view all robot skills)

Yes - for Sphero you should generally use the generic Movement commands, not
ControlCommand()to the Sphero Movement Panel.Use the Movement API instead of
ControlCommand()Since the Sphero Movement Panel is already the active Movement Panel in the project, these script commands will drive it:
Movement.forward(speed, timeOut)Movement.reverse(speed, timeOut)Movement.left(speed, timeOut)Movement.right(speed, timeOut)Movement.stop()Movement.setSpeed(speed)These are the supported project-level movement commands documented by ARC’s Movement Panel system: https://synthiam.com/Support/ARC-Overview/movement-panels
Example: timed routine in JavaScript
Or with a timed command:
If you want a turn:
Why
ControlCommand("Sphero Movement Panel", ...)is failingControlCommand()only works with commands that the specific robot skill exposes. The Sphero Movement Panel typically doesn’t expose the same kind ofForward/Left/SetSpeedcontrol commands that some other skills do. That’s why you’re seeing Unknown command.You can read more about how
ControlCommand()works here: https://synthiam.com/Support/Programming/control-commandFor on-screen D-pad buttons
The best option is to use Interface Builder and add a Joystick Pad or buttons that call the generic movement commands.
Option A: Joystick Pad
Add:
Project Add robot skill Interface Builder
Then in the skill’s settings, add a Joystick Pad and set it to control the Movement Panel. That way it will drive Sphero through the project’s active movement system.
Option B: Buttons mapped to script
Create buttons in Interface Builder and assign scripts like:
About using the Rovio panel as a D-pad
That’s not a good fit because some Movement Panel UI elements are tied to their specific robot skill and may disable when disconnected. For a generic, always-available D-pad, use Interface Builder instead: https://synthiam.com/Support/Skills/Remote-Control/Interface-Builder?id=16063
If you want precise heading control on Sphero
For heading-style moves, the Sphero Movement Panel may expose its own settings in the kebab menu / skill configuration, but scripting should still be done through the generic movement functions unless the skill documentation explicitly lists a
ControlCommand.If you want, I can help you build:
If you’d like, paste the exact name of your Sphero Movement Panel title bar and I can help map the buttons correctly.