We have a drive train where both motors need to spin the same direction (clockwise) to go forward. This is different from most where one motor spins opposite the other to go forward.
Can the drivetrain setup in vexcode be configured for two motors that spin the same direction for forward motion? Right now, because of the mechanics, if we tell it to turn, it goes forward. If we tell it to go forward or reverse, it turns. I know this is because of the orientation of our motors, but I see no way to tell the configuration that we have both motors oriented the same way.
I hope that makes since.
You don’t have the motors oriented the same way. You have to reverse the speed/direction of one of them.
I don’t think this would be possible, it is a fairly unusual use case. The option to do this did exist in Modkit and RobotC, but the Drivetrain command in VEXcode is designed to be super simple to use and to be used with fairly standard drive bases.
Less common configurations would need you to use independent motor commands. You could easily make functions to pass distances and rotation angles to which would give you the same effect as having the drivetrain commands.
That’s what I was afraid of. Was hoping to be able to use the easy drive “forward for” and “turn for” for autonomous. The robot is using gears in its drive train and because we wanted to have a narrower robot, the motors are offset which means they are connected to different gears in the sequence, which is why they both have to rotate the same direction now. Thanks for the input.
@jpearman I see your name in the drivetrain, motorgroup, etc h files. Would it be possible for me to edit one of these files to accomplish this? We’ve written block code to do some similar, but doesn’t seem to be as efficient. I figure if I can find some way to negate one side of the drive train from default, it would work. Will keep working on it, but since I found your name, figured I would ask. TIA
There’s no way of doing this with graphical configuration (ignoring hacking into the templates that VEXcode uses), and therefore, no way of doing it using blocks. Modifying the vex sdk headers wouldn’t help either. If you were using C++, it’s straightforward, either create a new drivetrain using motors or motorgoups that you have configured yourself, or perhaps flip the reverse flag on the relevant motor at the beginning of main.
thank you for taking a look and responding.