Python help

How do I code using python? mainly an auto I’m using the base python coder I need to make auto soon I don’t have too much time. I spent most of my time in blocks And now I have to switch. If you guys could just help me figure out how run the six motors and the same times and how to stop them that’d be helpful.

If you are familiar with how vex works in blocks that should help. Looks like you have a python competition template which should have the same driver, auton, initialize/pre-auton. The stuff that goes in pre-auton are like motor encoder resets and auto selectors.

Check out this app reference to see how things translate over: Python Programming for VEX V5 | Comprehensive Guide & Documentation — VEXcode Documentation

We can help more if you have some specific problems when you get everything set up.

Thank you. Do they cover 6 motor drivetrain?

The API says the use the app configuration interface, but I don’t think you can do that with 6 motor drives so code it yourself like:

Drive1 = Motor(Ports.PORT1, GearSetting.RATIO_18_1, False)
Drive2 = Motor(Ports.PORT2, GearSetting.RATIO_18_1, False) 
Drive3 = Motor(Ports.PORT3, GearSetting.RATIO_18_1, False) 
Drive4 = Motor(Ports.PORT4, GearSetting.RATIO_18_1, False)
Drive5 = Motor(Ports.PORT5, GearSetting.RATIO_18_1, False) 
Drive6 = Motor(Ports.PORT6, GearSetting.RATIO_18_1, False) 
LeftMotors = MotorGroup(Drive1, Drive3, Drive5)
RightMotors = MotorGroup(Drive2, Drive4, Drive6)

Where 18_1 is a green motor cartridge (36_1 would be red, and 06_1 would be blue), and false tells the motor to not be reversed. Here the odd motors are on the left, and the even motors are on the right. Modify this as needed.

You can still use python in blocks with the switch. We are using 6 motors and blocks. This is because the SmartDrive() function can use motor groups so if you do something like rside=MotorGroup(r1,r2,r3) (same for left) and then do a smart drive function SmartDrive(left_side, right_side, etc.). Just make sure you define a variable for your drive in the block variables tab and have the SmartDrive() function inside it. Thats how you can do autonomous. If you want I can make a template and post it on github

yes please! Thank you!