Protocol » Zgodovina » Verzija 9
Verzija 8 (Aleksandar Todorovic, 03.03.2013 19:22) → Verzija 9/10 (Aleksandar Todorovic, 03.03.2013 19:23)
h1. Protocol
h2. MOVE
<pre>
MOVE <motor [LEFT|RIGHT|BOTH] default:BOTH> <direction [FORWARD|BACKWARD]> <unsigned int amount> <unit [MM|CM|M|STEPS] defaults:STEPS>
</pre>
h3. Description:
Moves the selected motor in the desired direction by a desired amount.
h3. Example:
MOVE LEFT FORWARD 100
Moves the left motor for 100 steps.
MOVE RIGHT FORWARD 15 CM
Moves the right motor for 15 cm.
MOVE BACKWARD 1 M
Moves both motors 1 m backward.
h2. SET ACCELERATION_MODE
<pre>
SET ACCELERATION_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH> <acceleration mode [CONSTANT|LINEAR] default:LINEAR>
</pre>
h3. Description:
Sets the acceleration method of the selected motor.
h3. Example:
SET ACCELERATION_MODE LINEAR
h2. SET MOTOR_MODE
<pre>
SET MOTOR_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH> <motor mode [INTERLEAVE|MICROSTEP|SINGLE|DOUBLE] default:double>
</pre>
h3. Description:
Sets the motor mode of the selected motor.
h3. Example
SET MOTOR_MODE INTERLEAVE
h2. SET MAX_SPEED
<pre>
SET MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH> <unsigned int (capped with motor constraints)>
</pre>
h3. Description:
Sets the max motor speed of the selected motor.
h3. Example:
SET MAX_SPEED BOTH 40
h2. SET ACC_SPEED
<pre>
SET ACC_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH> <unsigned int>
</pre>
h3. Description:
Sets the acceleration speed of the selected motor.
h3. Example:
SET ACC_SPEED RIGHT 10
h2. GET ACCELERATION_MODE
<pre>
GET ACCELERATION_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Returns the current acceleration mode.
h3. Example:
GET ACCELERATION_MODE BOTH
h2. GET MOTOR_MODE
<pre>
GET MOTOR_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Returns the current motor mode.
h3. Example:
GET MOTOR_MODE
h2. GET MAX_SPEED
<pre>
GET MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Returns the current max motor speed.
h3. Example:
GET MAX_SPEED BOTH
h2. GET ACC_SPEED
GET ACC_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>
h3. Description:
Returns the current acceleration speed.
h3. Example:
GET ACC_SPEED
h2. GET CONTROLLER_MAX_SPEED
<pre>
GET CONTROLLER_MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. escription:
Returns the max controller speed
h3. Example:
GET CONTROLLER_MAX_SPEED RIGHT
h2. RELEASE
<pre>
RELEASE <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Releases the motor coils.
h3. Example:
RELEASE RIGHT
h2. CLEAR
<pre>
CLEAR <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Clears selected motors order queue. The currently executing order is not affected.
h3. Example:
CLEAR
h2. STOP
<pre>
STOP <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Immediately stops the selected motors and clears their order queue.
h3. Example:
STOP LEFT
h2. MOVE
<pre>
MOVE <motor [LEFT|RIGHT|BOTH] default:BOTH> <direction [FORWARD|BACKWARD]> <unsigned int amount> <unit [MM|CM|M|STEPS] defaults:STEPS>
</pre>
h3. Description:
Moves the selected motor in the desired direction by a desired amount.
h3. Example:
MOVE LEFT FORWARD 100
Moves the left motor for 100 steps.
MOVE RIGHT FORWARD 15 CM
Moves the right motor for 15 cm.
MOVE BACKWARD 1 M
Moves both motors 1 m backward.
h2. SET ACCELERATION_MODE
<pre>
SET ACCELERATION_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH> <acceleration mode [CONSTANT|LINEAR] default:LINEAR>
</pre>
h3. Description:
Sets the acceleration method of the selected motor.
h3. Example:
SET ACCELERATION_MODE LINEAR
h2. SET MOTOR_MODE
<pre>
SET MOTOR_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH> <motor mode [INTERLEAVE|MICROSTEP|SINGLE|DOUBLE] default:double>
</pre>
h3. Description:
Sets the motor mode of the selected motor.
h3. Example
SET MOTOR_MODE INTERLEAVE
h2. SET MAX_SPEED
<pre>
SET MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH> <unsigned int (capped with motor constraints)>
</pre>
h3. Description:
Sets the max motor speed of the selected motor.
h3. Example:
SET MAX_SPEED BOTH 40
h2. SET ACC_SPEED
<pre>
SET ACC_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH> <unsigned int>
</pre>
h3. Description:
Sets the acceleration speed of the selected motor.
h3. Example:
SET ACC_SPEED RIGHT 10
h2. GET ACCELERATION_MODE
<pre>
GET ACCELERATION_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Returns the current acceleration mode.
h3. Example:
GET ACCELERATION_MODE BOTH
h2. GET MOTOR_MODE
<pre>
GET MOTOR_MODE <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Returns the current motor mode.
h3. Example:
GET MOTOR_MODE
h2. GET MAX_SPEED
<pre>
GET MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Returns the current max motor speed.
h3. Example:
GET MAX_SPEED BOTH
h2. GET ACC_SPEED
GET ACC_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>
h3. Description:
Returns the current acceleration speed.
h3. Example:
GET ACC_SPEED
h2. GET CONTROLLER_MAX_SPEED
<pre>
GET CONTROLLER_MAX_SPEED <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. escription:
Returns the max controller speed
h3. Example:
GET CONTROLLER_MAX_SPEED RIGHT
h2. RELEASE
<pre>
RELEASE <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Releases the motor coils.
h3. Example:
RELEASE RIGHT
h2. CLEAR
<pre>
CLEAR <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Clears selected motors order queue. The currently executing order is not affected.
h3. Example:
CLEAR
h2. STOP
<pre>
STOP <motor [LEFT|RIGHT|BOTH] default:BOTH>
</pre>
h3. Description:
Immediately stops the selected motors and clears their order queue.
h3. Example:
STOP LEFT