I am trying to run two motors connected to Port A and B of Mindstorms NXT simultaneously
b=nxt.locator.find()
def rotatewheel():
mymotor = b.get_motor(nxt.motor.Port.A)
secondmotor=b.get_motor(nxt.motor.Port.B)
syncmot=nxt.motor.SynchronizedMotors(mymotor,secondmotor,0)
syncmot.turn(25,300,timeout=3)
However, this did not move the motor and debugging throws the following:
DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000600 DEBUG:nxt.backend.usb:recv: 02060000000701002000000000de17000000000000de170000 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000601 DEBUG:nxt.backend.usb:recv: 02060001000701002000000000aaf5ffff00000000aaf5ffff DEBUG:nxt.motor:reversed DEBUG:nxt.backend.usb:send: 000a0001 DEBUG:nxt.backend.usb:recv: 020a00 DEBUG:nxt.backend.usb:send: 000a0101 DEBUG:nxt.backend.usb:recv: 020a00 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000600 DEBUG:nxt.backend.usb:recv: 02060000000701002000000000de17000000000000de170000 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000601 DEBUG:nxt.backend.usb:recv: 02060001000701002000000000aaf5ffff00000000aaf5ffff DEBUG:nxt.motor:updating motor information DEBUG:nxt.motor:setting brick output state: Mode.REGULATED|ON, RegulationMode.SYNC, 0, RunState.RUNNING, 0 DEBUG:nxt.backend.usb:send: 800400190502002000000000 DEBUG:nxt.motor:setting brick output state: Mode.REGULATED|ON, RegulationMode.SYNC, 0, RunState.RUNNING, 0 DEBUG:nxt.backend.usb:send: 800401190502002000000000 DEBUG:nxt.motor:tachocount: tacho: 6110 -2646 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000600 DEBUG:nxt.backend.usb:recv: 02060000190502002000000000de17000000000000de170000 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000601 DEBUG:nxt.backend.usb:recv: 02060001190502002000000000aaf5ffff00000000aaf5ffff DEBUG:nxt.motor:not advancing: tacho: 6110 -2646 tacho: 6110 -2646 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000600 DEBUG:nxt.backend.usb:recv: 02060000190502002000000000de17000000000000de170000 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000601 DEBUG:nxt.backend.usb:recv: 02060001190502002000000000aaf5ffff00000000aaf5ffff DEBUG:nxt.motor:not advancing: tacho: 6110 -2646 tacho: 6110 -2646 DEBUG:nxt.motor:getting brick output state DEBUG:nxt.backend.usb:send: 000600
and the error message
nxt.motor.BlockedException: Blocked!
INFO:nxt.backend.usb:closing USB (Bus 004 Device 010) connection
How do I move the two motors simultaneously?