Two Motors at Once

Alright so heres the deal. I have been using Modkit for my driver program but I would rather use VexCode Blocks. But I have no idea how to make 2 motors spin at once when I hold down a button on the controller.

This is one way to do it:
image

7 Likes

I will try it when I get home, thanks! Also if I change the turn velocity and drivetrain speed will it change when I drive it? (also motor velocity/torque) I know in modkit it does not change anything when your driving. Thanks!

(its been awhile since I have used VexCode)

I always enjoy when a post lets me sneak preview a new feature coming to VEXcode IQ/V5…

Screen Shot 2021-03-11 at 2.46.40 PM

Screen Shot 2021-03-11 at 2.46.49 PM

Screen Shot 2021-03-11 at 2.46.57 PM

14 Likes

ooo. bye bye mod kit xD

1 Like

Just realized that this will spin the motors seperatly. Do you know how to make them spin together?

What makes you think that they will spin separately? I think you should find that this does what you need.
The spin motor command is not a blocking command. That means you will see no gap between spin motor 1 forward and spin motor 2 forward

2 Likes

or you can make a custom variable

@tfriez

This looks like a really sweet feature!!!

I have noticed that commands that move multiple motors at once are usually unable to move these multiple motors in any combination of rotation directions, besides the ones made ar initialization. Will there be an easy way to change which directions the individual motors in the motor group will be spinning on the fly? Thanks!

2 Likes

One of my friends has two motors on their arm and have their code like this
image

Could you elaborate why would this be useful? If you need a block to change the direction of one motor and then need amother to move them, you are using the same number of blocks to just move each one individually.
If a design is complicated enough to need that functionality, I think coding the motors individually is reasonable. The group motor function is really there just to help with lifting or other grouped motor scenarios where the direction of all motors in the group would not change.

2 Likes