How to code 6 motor drive train using block coding

Hello everyone

I need one help, can anyone please help me how to code 6motor drivetrain using block coding please.

Create two motor groups: one for the left motors and one for the right motors.
Here’s an outline of the code, you should be able to replicate this with blocks:


when driver control
{
forever
{
if (abs(forward_input) + abs(turn_input) > 10)
{
left_motors_velocity = forward_input + turn_input;
right_motors_velocity = forward_input - turn_input;
spin(left_motors);
spin(right_motors);
}
else
{
stop(left_motors);
stop(right_motors);
}
}
}

I use controller axis 3 for forwards and axis 1 for turning, but that’s up to your preference. The if statement lets you make a dead zone, and you can adjust it to your liking by changing the number. Note that the above code isn’t correctly formatted for any particular language, but is just a basic textual representation of my code. I would give you a screenshot of actual code, but I’m currently on my phone.

Google is your friend here. I searched the exact title of this topic, and it gave me multiple videos showing how.


Here are the links to the videos:

Well, you would need to manually code the otherwise automatically generated drivetrain functions. THIS IS INSANELY HARD, I DO NOT RECOMMEND IT. I suggest trying to learn python/c++, or to at least code all the rest in block before switching to python or c++ for the drivetrain. I think that in IQ and V5, at least, you can switch to python/c++ coding.