
pacomms
Hi guys, so i have a quick question regarding scripting, basically im trying to make some kind of maping code with ez builder, for some reason the sonar scan module doesnt work to well with my robot but thats another story, what i wanna know is
1 - can i jump to another script from within a running script and then back again , ie if i made a simple script for forward motion i could include some kind of sub script to check the ping sensor and if nothing is within range jump back to the origional script and carry on ?
2 - from within a subscript can i use ie, if(D1 < 10 goto (another script) )
3 - can i save a value somewhere or somehow , ie move sonar servo left, save value then move right and save value then figure out which way is best ?
I know its basically what the sonar sweep does but like i said that doesnt work to well on my omnibot, he senses something then just spins around in a circle, also i would rather do it with scripts so i can add in other variables and sounds etc etc.
Hope that makes sense
Thanks
Kurt
If you post your EZB Project File in this thread, I can take a look at it for you.
As for scripting, you can't call another script control and "wait" for it to finish. What you can do is embed many "modules" in the script control. Check out these commands: LABEL, GOTO and RETURN
There will be assignable variables in the script in a few releases. I currently have a partial version working. But that won't be for a bit.
There's another version of ARC, EZ-SDK and EZ-B Firmware tomorrow that I have been working on this weekend. It has some neat new goodies
Thanks
Kurt
Regards
Kurttest sonar omnibot.EZB
You have three scripts in the bottom right corner- Head Centre, Head Left and Head Right, all of which can be started by using the joystick or speech recognition. All three of these scripts have only one command. This means that instead of starting the script by pressing a button you can just write that single command in the Button Down/Up collumn
e.g. Servo(D1, 35)
This is the same with Speech Recognition
I know this is not quite related to your question. Hopefully it helps anyway
Also the camera control has both movement and servo tracking enabled. If you reference my wall-e big example. You can see that I set the tracking mode by commands. That way it doesn't try to do both all the time. Part of your issue is related to camera servo and movement tracking.
Start with a simple project that just has radar and a movement panel. Do you still experience the same issue?
Thanks alot
Kurt
Regards
Kurt
What sabretooth controller are you using?
I went to down load the "If you reference my wall-e big example" and it does not appear to be there any longer. Where have you hidden it??
2) Select File
2) Select Examples
3) Select Robot - Wall-e Bit
4) Smile