Asked
— Edited
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.
forward()
If ($direction = "forward")
Waitforchange("stop")
Endif
Any ideas?
Take a look at any of the examples for roli, JD or six
Thanks, I didn't realize there was a mobile variable set.
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..
Yea I realized that after I posted. Thanks rich.
Thanks for the info DJ.