Auton messing up during competition

I’ve been having a ton of trouble with getting my auton to work during an actual competition match. I’ll add pictures of my code in the replies. So, whenever I’m starting my auton from the Timed Run setting on the controller, it works just fine, but whenever I’m competing with the controller plugged into the towers, it’ll do the drive straight function and just start spinning until the auton period is over. And it isn’t just with this code, it’s with every code I use; and it’s done the spinning at several competitions, not just one. It’s really annoying and super frustrating, so I’m grateful for any help.

(Also, I made the switch from PROS to VEXcode a couple weeks ago, and it wasn’t doing the spinning with PROS. Is it possibly a VEXcode issue?)

when auton/when started code

drive straight function pt 1 (from caution tape robotics)

drive straight function pt 2

Is there any reason why the 4 drive-train motors work independently and aren’t collected together into a single 4-motor drive train.

I think the problem is some of the wheels are running but others aren’t for some reason. And the problem might be fixed if you force the motors to work in sync using a 4-motor drive train, instead of programming each one individually.

3 Likes

The drive motors are independent for the drive straight function. I could try making them motor groups instead, and see if that helps.

I think the problem is some of the wheels are running but others aren’t for some reason. And the problem might be fixed if you force the motors to work in sync using a 4-motor drive train, instead of programming each one individually.

^But it’s working fine when I start the program through Timed Run on the controller, I don’t see why the motors being programmed individually would have anything to do with why it’s not working during competition.

1 Like

What’s in the driver control code ? When using field control the robot will often go to driver control before being disabled at the beginning of the match, that doesn’t happen when using the controller to run timed autonomous code.

Very unusual to go from PROS back to using blocks…

3 Likes

I don’t have anything in the driver control code as of now, I didn’t think I’d need anything. Would it be best to duplicate the when started code and put it in the driver control code, so it would work both through the controller and during a match? (Genuine question, this is my first year with VRC)

Haha yeah, I started programming with Vex IQ and using blocks, and I thought that VRC only used text code lol. Trying to figure out C++ was a little too difficult for me, so I just switched back to blocks to make it easier for me.

It depends on exactly how you set everything up. You may wan’t to add this block at the beginning of auton (and driver control) to make absolutely sure that the auto generated controller code does not mess with the autonomous code.

4 Likes