Hi, i’m working on a fairly extreme project that a single V5 Brain is struggling with (12 Smart Motors, 9 sensors, and 1200 lines of code full of trig and other math). Is there any way to spread the load across multiple Brains? If so how?
you could try VEX link
There’s really no reason why the V5 cannot handle that much IO, how is the V5 struggling ?
Thanks for the reply! The Brain keeps crashing (screen freezes, motors disable, and the power button becomes unresponsive). I can’t help but think that it could be because the brain is only designed to run 10 motors at max force and I’m using 12 . And while the code isn’t relatively a lot for the brain’s processor to handle now I expect the program to get a lot larger once I start implementing pathfinding as it will store 3 data values per square in. it discovers. Plus I’m running out of ports lol
That looks useful! I’ll give it a shot, thanks
That sounds more like your code is corrupting memory or the brain has a hardware issue.
The V5 can easily handle all 21 ports being used, that’s not an issue.
and the only limitation on code size is that the executable needs to be under 3MB.
As a member of a vexu team that packed 11 motors into a 15" robot, I can tell you the brain should be able to handle it. As @jpearman, the failures you are describing are likely due to corrupted or nonexistent data in your program.
The brain is designed to handle all 21 ports as motors. It will reduce the max current draw of all motors if they draw more than 20 Amps total.
Thanks, that makes more sense…
Thanks that worked perfectly! Is there any way to link three brains that you know of? Because the website linked only shows how to link two and says that more than two is possible…
that would be a question for the master of all things V5 vexOs @jpearman!!!
having no direct experience with what is documented in VEXlink document - I would ask, is it possible for a worker to delegate to another robot as a manager role in the protocol?
My gut, if the protocol was masterfully crafted, why not? That would enable really bizarre roles - but interesting! Alas, my powers are few, and I defer to the best! @jpearman!
A link is between two brains, that’s a limitation of the radio protocol, it’s point to point. However, a V5 brain can support more than one VEXlink, so you could have brain 1 linked to brain 2, and then have brain 2 (using another radio) linked to brain 3. It’s your choice which end is the manager or worker end of the links.
Alrighty, i’ll try it, thank you very much for all your help!
You can also do a wired connection between brains by making a port a generic serial controller and connecting the brains with a smart cable
You can, also VEXlink can be used wired.
It’s best to use a custom cable if you do this with the power wire disconnected.
How exactly do I mod the smart cable? I cut the red wire assuming it was the power wire (wasn’t sure there was zero documentation on the color codes of the wires in the smart cable). I then copied and pasted the program for the wired connection from the document shared before, assigned the rolls and port numbers appropriately, and the brains won’t connect. Did I cut the wrong wire? Was there something I missed?
VEX has not officially released the pinout for the V5 smart ports. Some community members have reverse engineered it, I’ve linked one example below, just be aware that there is always the possibility that some smart cables may not have exactly the same wire colors, the cables are straight through (ie. both ends wired the same) and there’s a chance that some may have black and yellow wires reversed, especially if they were customer made.
Found the problem… in the line that sets the Vex Link there is a fourth parameter that defines if the link is wired or wireless, this defaults to false for a wireless connection. So Vex wrote there example code wrong:
on the manager side it was:
vex::serial_link LinkB(PORT20, “vex_robotics_team_1234_B”, linkType::manager);
it should include the true to define that the connection is wired:
vex::serial_link LinkB(PORT20, “vex_robotics_team_1234_B”, linkType::manager, true);
on the worker side it was:
vex::serial_link LinkB(PORT10, “vex_robotics_team_1234_B”, linkType::worker);
vex::serial_link LinkB(PORT10, “vex_robotics_team_1234_B”, linkType::worker, true);
I also cut the yellow wire and its running fine so far! Thanks for the help i’m supper happy this is working now!
I didn’t write the example wrong, examples were specifically for the AI competition and all links will be wireless.
My bad, I mistook serial link with a wired connection, that makes much more sense…
You know, you could write up all the steps in one new post as a reference for all those who want to do wired connections between brains and then mark it as a solution for this thread
Thanks for sharing your adventure!