Mecanum drive auton i need help in block

Recently my team has decided to switch to mecanum drive and we get the drive put together easily and I coded the bot it didn’t work at the time but i think i got it working now i don’t know where to start with a simple right or left side auton. I know what i want it to do i just din’t know how to achieve that with the way i was showed how to set up the mecanum drive. if i could get the auton ready by February 18th in time for our next tournament that would be great however i don’t know where to start. if someone could explain how i could get it to go forward back left right, and strafe that would be great. also i have looked it up but it didn’t give me any helpful advice.

1 Like

I have not tried to do autonomous with mecanum wheels, but this drive code may help

The middle section has the main motor speed control, the other 2 are for stopping when the stick is centered.

I’d recommend that you define functions (“My Blocks” in VEXcode) for driving straight and turning. You can then call the functions when needed. Here is a snippet of code that one of my teams used a few years ago. They named the function “Line” (straight line driving) and called it with a velocity and a Boolean T/F value to specify strafing as on/off. They had a second function for turning.

Note: The commands actually turning the motors where in the main loop of the code. The functions only set the velocities.

meccanum function

If you haven’t used “My Blocks” before, go through the tutorial included in VEXcode V5.

Good Luck.