Please help ASAP v5Python!

Hi! I am coding in v5Python and I want to run multiple motors at the same time/simultaneously.

I want to run a lift and a drive at the same time but it needs to be autonomous I cant waste time even 1-2 sec for it to stop start moving the lift and then drive! I just want to have it start at the exact same time!

How would I run multiple motors at 1 time in v5Python?

Can you please share the code that you already have? We can’t help you until you show us what you’ve tried.

Please embed your code in [code] and [/code] tags to make it easier to read.

3 Likes

myVariable = 0
message1 = Event()
Start_init = Event()
Test = Event()

def when_started1():
    global myVariable, message1, Start_init, Test
    FrontRight.set_velocity(127, PERCENT)
    FrontRight.set_velocity(127, PERCENT)
    FrontRight.set_velocity(127, PERCENT)
    FrontRight.set_velocity(127, PERCENT)

def onevent_controller_1axis1Changed_0():
    global myVariable, message1, Start_init, Test
    FrontRight.spin(FORWARD)
    BackRight.spin(FORWARD)

def onevent_controller_1axis3Changed_0():
    global myVariable, message1, Start_init, Test
    FrontLeft.spin(FORWARD)
    BackLeft.spin(FORWARD)

controller_1.axis1.changed(onevent_controller_1axis1Changed_0)
controller_1.axis3.changed(onevent_controller_1axis3Changed_0)
wait(15, MSEC)

when_started1()

Here is the code What i want is when the controller is in pos1 the right side moves and when in pos 3 the left side moves. I need both right to start up at the same time. Same with the right