I want to start a new tutorial, and for this I am hoping for your input as well to make this work. With the ability of connecting more than one EZ-B v4 to a robot project, I feel that it would be very helpful for new and established members (myself included) to find out exactly what can be done using more than one v4.
My idea is to document what can and cannot be done on a secondary board, with a simple to understand format with a short explanation. There is information of what is achievable using more than one board in the EZ-Script menu (some may be included in this thread), clicking the "Help" icon on controls, and in the tutorials in the learn section, and some of EZ-builders controls have the option to select a board. But having a one stop list of all what can be done all in one place may be easier to search through, some of which may not be covered or easily understood in the script menu and learn section.
Some posible subjects with posible script examples that could be covered are...
.) GetVoltage and GetCPUTemp
.) MP3 triggers
.) Serial commands
.) ADC ports (eg, ADC sensor readings)
.) Digital ports (eg, Digital On/Off)
.) Ping sensors (with or without motor controllers)
.) Battery monitor scripts
.) Using Cheat Sheet (Control Commands)
.) Auto Position control
.) Limitations and differences using "AP mode" and "Client mode" with multiple boards.
and I'm sure that there are more subjects I have missed.
I know that many of the experienced members here use multiple boards in their projects, so your input here would be would be valuable and most welcome. So to anyone who wants to participate in this dynamic tutorial, remember to keep it short, easy to understand, and give simple script examples where appropriate so that our newer members and current users who find scripting a bit challenging, can pick thing up quickly and easily.
Add as few or as many as you like, and if you see anything that you think may be incorrect, then please let us know with your correct answer and solution. And if you have something you would like to ask about using multiple boards, don't be afraid to ask however silly you may think the question is, and we'll see if someone can answer you. I hope you all find this a good and useful idea, and I hope you take part in an effort to helping our fellow community members.
Upgrade to ARC Pro
Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro
A Movement Panel can only be used with "Board 0".
Controlling a servo can be done using any board, in this example, "Board 0" and "Board 2". An example of a simple servo script would be...
The "2." in the above script is the number of the board the servo is connected to. The same can also be done with servo speeds.
You can connect an EZ-B v4 camera to any board. You can also have two v4 cameras connected to both "Board 0" and "Board 2" and can be selected from the camera control. You can also have two camera controls in any one ARC project.
Now, it's over to you...
(Revised this post)
I don't have much to contribute at the moment. I believe you can select serial ports in a similar way. Something like this, as I recall.
UARTWrite(boardindex, port, data).
Also from what I have read, you can only send sound to board 0.
IsConnected(BoardIndex) is another one. As is ReleaseAll(BoardIndex). There seem to be 5 predefined board specific commands as well, Connect0 - Connect4.
There is a script command called ReleaseAll() which will release all servos connected to the chosen v4. For example...
will release all servos connected to "Board 0". And the following script...
will release all "Board 2" servos from their holding positions.
I2C (script example).
Information for devices that use the i2c ports on the v4, can be sent and received on multiple boards. The following script is for an LCD05 display screen that will display that will time...
The very first zero in the script is the board number, in this case, "Board 0". To use this script with an LCD display connected to "Board 2", it would be as follows...
The "Soundboard v4" can be used with muitiple boards. In ARC, click the configuration menu tab (small gear icon) on a soundboard v4 control, then select the board you want to use from the "Board#" drop down menu.
Ping(2.D18, 0.D0) #0.D0 can be written as just D0 too
Movement panels and other controls may not always have the board option available. Generally script commands will where they refer to the ADC or Digital Ports.
I'm also not aware of anything that won't work that way on another connected board except motor controllers where a Movement Panel is concerned.
Thanks for your input Rich. Much appreciated, and helpful.
Does anybody know if a board number can assigned to this, like the following...?
Also, it would be great to see some input the from EZ-Robot guys, especially in regards to control commands, using Auto Position, getting v4 info, and the difference between AP and Client modes (if any) when using multiple boards. I know that there will be lots of members who would welcome any contribution.
As of 5/23/16 build, SayEZB() and SayEZBWait() both accept an optional second parameter that specifies the EZB Index to output to as per this request: http://www.ez-robot.com/Community/Forum/Thread?threadId=5889
Copied from release notes verbatim