Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

How To Make Image Button Stay Color Until Direction Change?

This is just a question about something I came across.

When using an image button in the ARC mobile interface, if you make the script "forward()", It doesn't change to the running color.

If I add a sleep, it will change color until the sleep is done, regardless of a direction change.

I tried the following script with no prevail.


If ($direction = "forward")

Any ideas?


Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Take a look at any of the examples for roli, JD or six
Thanks, I didn't realize there was a mobile variable set.
United Kingdom
There isn't. The variable is set in the code. Similar code is used on other directions so when a different direction is called for the variable changes and the script stops running therefore causing the image to return to the default image rather than the running image.

As DJ said, check the examples for Roli, JD and Six, they all use this method.
Also, if your robot does not use an HBridge or additional movement panel... And by that I guess I should elaborate.. The AutoPosition comes in two flavors, one with and one without a movement panel.

So, if you are using the AutoPosition, and would like to keep the last action button pressed, do this..


ControlCommand("Auto Position", AutoPositionAction, "Fast-Forward")
Yea I realized that after I posted. Thanks rich.

Thanks for the info DJ.