USA
Asked — Edited
Resolved Resolved by Rich!

Debugging Mobile Interface

First off, let me say thank you to all of you who have been so helpful. I'm a newbe with ARC, so I really appreciate the assistance.

I'm having trouble with a script getting hung up, or stopping because of an error. It's a fairly striaght forward script, just moving a pan servo with my HCsr04 sonar on it, looking for obstacles, and directing the drive motors. Someone was very helpful in pointing out the Variable watch as this was a great help in debugging. I also used the Console to watch the code execute, and finally got it working the way I expected it too.

Then I downloaded the same code to my tablet and the code hangs up apparently early in its execution. First off, I don't understand why it would work on my PC and not on the tablet, I know the tablet does not have all of the functionality as the PC, but I'm only using the following commands;

If/then servo() servospeed() goto() print() sleep() getping() return()

Is there a way to watch it execute on the tablet the way you can use the Console on the PC so I can debug this?

Thanks


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

United Kingdom
#9  

There should be no difference between the desktop PC version and the Mobile version. Scripts run the same on both.

You can use temporary flags to help debugging, it's what I did when scripting anything. This is as simple as using something like $DebugFlag0 = 1

Pop those in various places, rename them if needed i.e. $SonarFault = 1 and watch the variable watcher. If it doesn't error on the PC then it wont error on the tablet. If it does have strange behaviour on the tablet then the problem lies in the OS or software on the tablet and I would suggest removing and reinstalling everything again on the tablet.

Another thing you could do is add an LED which will blink at specific points in the script. While running from the tablet count the blinks, you can then find out exactly where the script is when it fails.

To add, on the PC, if you are debugging a script in the script control it runs slower. This is important to note when you are relying on time i.e. the sleep commands or the time it takes to compute so many commands.

#10  

Thanks for the good suggestions, I will try the variable flag to watch in the variable watcher.

There is a definite difference between running my script from my pc & tablet, as I have done it several times. I hadn't thought about the tablet is being the issue, as I have run about half a dozen other scripts without issue. I even got a notice last week that there is an update for my android is, and am putting off installing it because I was afraid of software conflicts with ARC.

Thanks again, will give it a shot.