Program functional but the drivetrain is not?

Hi! My team is having an annoying and big issue with the drivetrain. All the motors are working just fine and we were sure that the program is functional. However, when testing our drivetrain, only the left side of the drivetrain works. We tried to change the code, but we kept having the same results. Can you please help us? What could explain this issue?

This description alone isn’t enough to help. Could you include some code so I could double-check that it is written properly? If you know the motors work, then it is most likely the code that is the issue. If not, then it might be bad ports on the cortex/brain or bad wires.


Make sure you motors are good, switch the wires around to check, make sure your wires and all ports are good, and lastly have them triple check their code.

Can you explain exactly what the drive train does. Lift it off the ground and see if axles are coming out of motors or gears or whatever. If you say the motors and code are fine it could be the build. Post a pic of the bot maybe

We already tested each motor on its own and every motor is working fine. The shafts are already inserted in the motors.

When a motor is plugged in and getting power right here lights up.

make sure this light is on on the motors that are not working

1 Like

I can’t see enough of your code to see if thee is an issue. If you copy your code and paste it in here (and there is a way to have is show up in proper formatting, someone else can explain that, please). Then we can see if it is a coding issue. That would be my guess.

All the LEDs are working.

I can’t see much of your code. But what I see is you’re setting velocity and I highly doubt your’re telling it to start spinning after velocity is set (???)
For simplicity and for the purpose you are looking for, could you try replacing
Motor.setVelocity(..., ... );
Motor.spin(fwd, ..., ... );
In your while statement and see if it works? :slight_smile:

1 Like

Do what Connor says, also your motor.spin commands are outside the driver control loop.

1 Like