Asked — Edited
Resolved by DJ Sures!
I am trying to write a script to control servos on a second EZ board. How do I address a second board.
Control at D0 on main board is Servo(D0,100).... what is the command for a second or third board?
Upgrade to ARC Pro
Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!
Servo(1.D0, 100) will control the second board (Board 1)
Servo(2.D0, 100) will control the third board (Board 2)
And so on...
If you don't put the leading board number it will assume the board is board 0.
It is mentioned in the script manual. Search for the term "Multiple EZ-B Boards" or "References" for the full description/explanation.
I have the arms on board 1 and the head and face on board 0...
At this moment, every time I need to compose an action that uses arms and head, I have to use TWO AutoPosition commands.. And that gives me unsync actions...
Is there a solution ?
For smoother movement you could use Ifs with some variables and the ServoUp and ServoDown commands along with GetServo to get the current position. It would be a lot of work with scripting though (even a simple example would be a lot of code hence why there will not be an example at the end of this - unfortunately I don't have the time right now but the script manual should explain the commands enough to work it out), personally I would use the two Auto Position controls.
How far out of sync are they when you run two actions from two Auto Position controls? I have presumed you run both together with a short script consisting of two control commands one after the other?
I understand.. But, would be too much complex to implement a command to choose the board number with each servo ?
So we could add in same AutoPosition servos on multiple boards, with a limit of 24...
Just an idea..