top of page

Motor and Drive Commands

allstopon - STOP ALL MOVEMENT

Purpose This stops all movement of the robot and puts it in a safe mode.

Syntax allstopon

Notes This command overrides ALL other commands that would normally be able to induce some kind of movement in the robots drive system.

The ONLY way to leave all stop on mode is to run the allstopoff command.


allstopoff - Leave all stop on mode.

Purpose

This causes the robot to leave all stop on mode.


Syntax

allstopoff


bmd - The direction of BOTH motors

Purpose Allows the direction of movement of both drive motors to be set at the same time. Syntax bmd dir Arguments dir 0 = Forwards 1 = Reverse.


bms - Set the speed of both drive motors

Purpose This sets the speed of both drive motors to the same value.

Syntax bms value

Arguments value -100 to 100 Where: -100 full reverse 0 stop 100 full forward

Pushers No Returns Nothing

Examples bms 0 STOP bms 50 Half forward bms -50 Half back Channels & Vars Channel 150 both motor speed 160 left motor speed 170 right motor speed

Notes This is for robots with motor drives.


cbst - Cold start boost for the drive motors

Purpose This is an extra duty cycle added to the motors speed when its starting from stand still.

Syntax cbst value

Arguments value 0 to 1000 This is a duty cycle.

Examples cbst 100 Set to 100

Notes This is for robots with motor drives.


dmlp - Set Left Drive Motor Esp32 Pin no

Purpose This is the pin on the esp32 to use for the left drive motors pwm.

Syntax dmlp pin

Arguments pin The pin no on the esp32 to use.

Notes This is for robots with motor drives. Don’t use unless you know what you are doing.


dmrp - Set Right Drive Motor Esp32 Pin no

Purpose This is the pin on the esp32 to use for the right drive motors pwm.

Syntax dmrp pin

Arguments pin The pin no on the esp32 to use.

Notes This is for robots with motor drives. Don’t use unless you know what you are doing.


dslimit - Disable Steering Limit Checking

Purpose

This allows the steering limit switch checking to be enabled and disabled on robots using a linear actuator with limit switches for steering.


Syntax

dslimit value


Arguments

value

0 = Don’t disable 1 = Disable

Pushers No Returns Nothing


Examples

dslimit 0 Don’t disable steering limit switches

dslimit 1 Disable steering limit switches


Notes

This should only be used for testing.


faster - Pulse the drive motors forwards a little.

Purpose This will briefly pulse both drive motors in the forwards direction a little and then turn them off.

Syntax faster

Examples faster Move robot forwards a little


left - Pulse the robot to the left

Purpose On a robot with motor drives fitted this command will cause the robot to turn a little to the left.

Syntax left

Examples left Turn slightly to the left.

Notes This is for robots with motor drives.


lmd - Set Left Drive Motors Direction

Purpose Set the direction of travel of the left drive motor. 0 = forward

Syntax lmd dir

Arguments dir 0 = forward 1 = reverse 1 = reverse


lmo - Set Left Drive Motors Offset

Purpose This is added to the motors speed at a low level to compensate for differences in the motors.

Syntax lmo offset

Arguments offset The duty cycle offset between 0 and 1000.


lms - Set the speed of the left drive motor

Purpose This sets the speed of the left drive motor.

Syntax lms value

Arguments value -100 to 100 Where: -100 full reverse 0 stop 100 full forward

Pushers No Returns Nothing


Examples lms 0 STOP lms 50 Forward half lms -50 Back half Channels & Vars Channel 150 both motor speed 160 left motor speed

Notes This is for robots with motor drives.

lmt - Left motor start threshold

Purpose

This is the min speed value at which the left motors wheels will turn. Range 0 to 100.


Syntax

lmt value


Arguments

value

0 to 100


Examples lmt 25

Channels & Vars Channel 165

Notes This is for robots with motor drives.



right - Pulse the robot to the right

Purpose On a robot with motor drives fitted this command will cause the robot to turn a little to the right.

Syntax right

Examples right Turn slightly to the right.

Notes This is for robots with motor drives.

rmd - Set Right Drive Motors Direction

Purpose Set the direction of travel of the right drive motor. 0 = forward

Syntax rmd dir

Arguments dir 0 = forward 1 = reverse


rmo - Set Right Drive Motors Offset

Purpose

This is added to the motors speed at a low level to compensate for differences in the motors.


Syntax

rmo offset


Arguments

offset

The duty cycle offset between 0 and 1000.


rms - Set the speed of the right drive motor

Purpose This sets the speed of the right drive motor.

Syntax rms value

Arguments value -100 to 100 Where: -100 Full reverse 0 STOP 100 Full forwards Examples rms 0 rms 50 rms -50

Channels & Vars Channel 150 both motor speed 170 right motor speed

Notes This is for robots with motor drives.

rmt - Right motor start threshold

Purpose This is the min speed value at which the right motors wheels will turn. Range 0 to 100. Syntax rmt value

Arguments value 0 to 100

Examples rmt 25

Channels & Vars Channel 175 Notes This is for robots with motor drives.


rstdv - Reset the motor drive system

Purpose Resets the drive system to the way it is when the JackBord is turned on. Syntax rstdv

Examples rstdv


sbms - Set the speed of both drive motors to different values

Purpose This sets the speed of both drive motors to the different values in the same command.

Syntax sbms left right

Arguments left Speed of the left motor. -100 to 100 Where: -100 full reverse 0 stop 100 full forward right Speed of the right motor. -100 to 100 Where: -100 full reverse 0 stop 100 full forward

Pushers No Returns Nothing

Examples sbms 0 0 Stop sbms 25 50 Left turn sbms 50 25 Right turn sbms 20 20 Forwards Channels & Vars Channel 150 both motor speed 160 left motor speed 170 right motor speed

Notes This is for robots with motor drives.


sdmct - Set the JackBord drive motor controller type

Purpose Set the type of motor being used on the robots drive system. Options are:

Type Description

  1. 0 NO motor drive installed.

  2. 1 Normal MOSFET mode

  3. 2 DRV8833 H-bridge

  4. 3 L298N H-bridge

  5. 4 BTS7960B H-bridge

  6. 5 Mobility scooter drive using MCP4161 Digital Potentiometer

  7. 6 Single Front Wheel Drive on, front. Connected to the L298 H-bridge Output 2.

Syntax sdmct value

Arguments value Drive type type, see above.

Examples sdmct 2 Set DRV8833 H-bridge type.

Notes This is for robots with motor drives.


sdtur - set default turn urgency

Purpose

Set the default turn urgency


Syntax

sdtur value


Arguments

value

1 to 50


Examples

sdtur 10 Set default turn urgency to 10


setstmax - Set the Maximum Safe Operating Speed for the robot

Purpose

This allows a safe maximum speed to be specified and it will be enforced automatically.


Syntax

setstmax speed


Arguments

speed

-100 to 100

Where: -100 full reverse 0 stop 100 full forward


Notes

This is for robots with motor drives. The limit set here is automatically enforced by the drive system.


setstmin - Set the Minimum Safe Operating Speed for the robot

Purpose

This allows a safe minimum speed to be specified and it will be enforced automatically.


Syntax

setstmin speed


Arguments

speed

-100 to 100

Where: -100 full reverse 0 stop 100 full forward


Notes

This is for robots with motor drives. The limit set here is automatically enforced by the drive system.


slower - Pulse the drive motors backwards a little.

Purpose This will briefly pulse both drive motors in the reverse direction a little and then turn them off. Syntax slower

Examples slower

Move robot backwards a little


ssv - Set Speed Step Value

Purpose Set the amount by which the speed of the drive motors will be changed by other commands such as turn. Syntax ssv value

Arguments value 1 to 50 Pushers No Returns Nothing

Examples ssv 10 Set to 10

Notes This is for robots with motor drives.


straight - Drive in a straight line

Purpose

Causes the robot to drive in a straight line.


Syntax

straight

stop - Stop both of the robots drive motors

Purpose

Use this to bring the robot to a halt.


Syntax

stop


Examples

stop Halt the robot


Notes

This is for robots with motor drives.


strpw - Set the linear actuator pulse width in milli secs

Purpose

This sets the width of the pulses used to move linear actuators attached to the JackBord via an L298 H-bridge.

The shorter the pulse the slower and more precise the control is.


Syntax

strpw value


Arguments

value

Pulse width in milli-seconds between 1 and 1000ms.


Examples strpw 200 Set the pulse width to 200ms

Notes This is for robots with motor drives.


strtype - Set the steering type

Purpose Set the type of steering being used on the robots drive system. Options are: Type Description

  1. 0 Normal differential drive

  2. 1 Rack and pinion steering

  3. 2 Single front steering wheel

  4. 3 L298 Linear Actuator ie Beach Robot. On L298 h-bridge motor no 1.

Syntax stur value

Arguments value Steering type, see above. Pushers No Returns Nothing

Examples strtype 0 Set differential steering

Notes This is for robots with motor drives.


stur - Set turn urgency

Purpose This is the increment used when turning. The higher the value the more aggressive turning will be.

Syntax stur value

Arguments value Turn urgency 1 to 500. This is a duty cycle. Pushers No Returns Nothing

Examples stur 200 Set the turn urgency to 200

Notes This is for robots with motor drives.


tgdir - Toggle the direction of travel.

Purpose

This toggles the current direction of travel of the drive motors.


Syntax

tgdir


tsf - Set turn speed factor

Purpose This is the increment used when turning. The higher the value the more aggressive turning will be.

Syntax tsf value

Arguments value 1 to 50 Pushers No Returns Nothing

Examples tsf 10 Set the turn speed factor to 10.

Notes This is for robots with motor drives.


turn - Turn the robot left or right

Purpose Provides a means of steering a robot using values in the range: -100 Full left turn 0 Straight 100 Full right turn The exact limits for left and right are set using the minleft and minright commands.

Syntax turn value

Arguments value

-100 Full left turn 0 Straight 100 Full right turn Examples turn 0 Go straight turn -10 Soft left turn turn 90 Hard right turn

Channels & Vars Channel 153

Notes This is for robots with motor drives.


vdView - drive system status

Purpose View the status of the motor drive system. Syntax vd



bottom of page