4 motor drive stuck all the time

Our 4 motor drive is not working any more. Here’s a video: https://youtu.be/RHui4-iE90Y

Our program groups the left and right motors together as one. This means both motors on the left side or on the right side spin the exact same rotations. We under stand that 4 motor drive motors spin different amounts but can’t find a program to do the calculations. By the way we’ve already looked at Coding v5 for 4 motor drive but it doesn’t work for us.

Posting your code would help. I’m not a builder, but I’m trying to mentally to figure out if the wheels on each side are spinning in different directions, which would result in your omniwheels moving a lot and the traction wheels moving very little. If that is the case, you can’t have your left and right motors spin the same amount; you are going to have to reverse one of the wheels on both sides.


When turning, one side spins forward while another spins backwards. We were wondering if there was any code out there other than the second link posted that will adjust each motor to the proper amount

posting your code would really help but you can divide your joysticks by any amount in order to tune your turning. Again your code would really help and you would definitely get a more helpful solution quicker.

I’ll need to get the code from my team mate. He’s the one with the computer with the code. He’s probably asleep right now. I hope to get it out tomorrow.

Also the bigger question we have at this point is why is it when our robot spins right or left it’s super janky but when spinning left followed by a right, it’s perfectly fine. Similarly when spinning right followed by left it works fine. (Shown in video)

Try replacing the traction wheels with omnis or putting more weight in the back of the robot

1 Like

So we figured out how to solve the problem. The motors are holding each other back when turning. Now during auton, the front right motor shuts off when doing a right turn. This makes efficient turning

We want to do the same for driver, but have no idea how to shut off the motors accordingly when turn. Our driver uses only one joystick and is the basic vex code. My team has decided that this driver thing is not that high of a priority. I think this is important, but am not a programmer ;-;. If possible, sending some example code would be much appreciated! Thank you!

1 Like

after watching the video again It looks like both of your front wheels spin backwards when turning. This could be a camera thing but did you try lifting your bot off the ground and looking at how the wheels spin. The left should be going in one direction and the right should be going in the opposite direction. I will write some pseudo code for what you suggested although I believe this is being caused by an error in your code.

1 Like

I modified vexCode’s arcade drive template to include the front motors. Basically the back motors work like normal arcade and the front motors only spin when the forward/backward axis is moved. There is also a deadband its not how I would do it but I’m to lazy to change it.

 // Deadband stops the motors when Axis values are close to zero.
  int deadband = x;

  while (true) {
    // Get the velocity percentage of the left back motor. (Axis2 + Axis1)
    int leftBackMotorSpeed =
        Axis2 + Axis1;
    // Get the velocity percentage of the right back motor. (Axis2 - Axis1)
    int rightBackMotorSpeed =
        Axis2 -  Axis1;
    // Get the velocity percentage of the right Front motor. (Axis2)
    int rightFrontSpeed =
    // Get the velocity percentage of the left front motor. (Axis2)
    int leftFrontSpeed =
    if (abs(leftBackMotorSpeed) < deadband) {   
      Set left back motor to 0; 
    } else {
      set left back motor to leftBackMotorSpeed;
    if (abs(leftFrontSpeed) < deadband) {
    Set  Left Front motor to 0;
    } else {
      Set left front to leftFrontSpeed;
    if (abs(rightBackMotorSpeed) < deadband) {
     Set Right back Motor to 0;
    } else {
     Set Right back Motor to rightBackMotorSpeed;
    if (abs(rightFrontSpeed) < deadband) {
     Set Right Front to 0;
    } else {
     Set Right Front motor to rightFrontSpeed;

    // Spin both motors in the forward direction.
    LeftMotor spin fwd;
    RightMotor spin fwd;
    RightFront spin fwd;
    LeftFront spin fwd;

Take note that a good portion of this is psuedo code and you will have to add the correct syntax, and commands. I am still convinced that this is an easily fixable error in your current code and This code will not provide the best turns.


Only one of the front wheels spin backwards when turning and thank you so much for the example code!

My team is going to test it in a bit; hope it works!

We will have to modify the code slightly since we use axis 3 and 4. But that’s a small thing

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