Skip to content

Motor control

Yusuke Ide edited this page Oct 5, 2020 · 2 revisions

/run (int)motorID (float)speed

Argument

Argument Range Description
motorID 1-4, 255 motor ID
speed -15625 - 15625 [step/s]

Executable timing

Always

Description

Rotates the motor at the specified speed. Accelerates according to the acceleration of the pre-set speed profile. The specified rotation speed will be limited by maxSpeed if the maxSpeed is exceeded. The motor remains in the BUSY state until the specified speed is reached.

/move (int)motorID (int)step

Argument

Argument Range Description
motorID 1-4, 255 motor ID
step

Executable timing

when the motor is stopped

Description

Moves a specified number of steps according to the pre-set speed profile. Remains in the BUSY state until it finishes moving the specified number of steps.

/goTo (int)motorID (int)position

Argument

Argument Range Description
motorID 1-4, 255 motor ID
position -2,097,152 - 2,097,151

Executable timing

Always

Description

Moves to the specified position in the shortest route according to the pre-set speed profile. Remains in the BUSY state until it finishes moving to the specified position.

Inside the driver, -2,097,152 and 2,097,151 are located next to each other in a circle.

/goToDir (int)motorID (bool)DIR (int)position

Argument

Argument Range Description
motorID 1-4, 255 motor ID
DIR 0-1
position -2,097,152 - 2,097,151

Executable timing

Always

Description

Moves to the specified position in the specified direction according to the pre-set speed profile. Remains in the BUSY state until it finishes moving to the specified position.

Clone this wiki locally