How to code 4 motor drive?

We are trying to code a 4 motor drive. The 2 motors on each side need to move in opposite directions and we want to use both 2 joysticks to drive. Additionally, we want the motors to run at 100%. Can someone help us out? We are trying to use block code but are willing to try anything.

Here is a quick set by step

Click the icon that looks like a port
image

Click Add Device and Motor Group

Select the 2 ports of the left side motors in the drive train. Next reverse motors if needed Then name the motor group right_drive (you can change this later)

Repeat this for the left side and name it left_drive

Next, add a controller.
Doesn’t need any configuration.

Next, make this simple code.
I used it on drive control so it’s good for a comp.

Upload and see if you need to change the direction of any of the motors. Just click on the motor group to reverse a motor.

If you don’t want tank control it isn’t too hard to make arcade control. I can help with that but I think you should try to push yourself first.

Hope this helps. :slight_smile:

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.