Asked — Edited
Resolved Resolved by Rich!

Controlling Motor Speed In Speech Recognition Contol Panel?

Hello, so I have set up a sabertooth 2 x 12 dual (using serial) motor controller with a Movement Panel and speech recognition to control my robot... So far so good... works great... However using the commands... forward, reverse, left and right speech commands only drive the motors at full speed (no matter what number I put in the command as a speed parameter)... So forward(100,2000) moves the robot forward for 2 seconds at the same speed as does forward(255,2000).... In other words I want to use the voice commands forward slow and forward fast, but I can get the speed to change under voice control... Any ideas what I am doing wrong?

Skip to comments


Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

United Kingdom

Do EZ-Script commands (in a script) i.e. Forward(50,2000) move the sabertooth slower?

A solution could be to use the SendSerial() commands for different speeds. But this is EZ-Robot, it should be easy:) Hopefully DJ can shed more light on it as, to me at least, it seems it could be an issue with the movement commands and the sabertooth rather than anything else.


Thanks for responding Rich... Nope, no matter what value I enter in the forward command the Sabertooth powers the motors at full speed... So Forward(255) is the same as forward(50) or even just forward()... all the same...

United Kingdom

I'd guess (and bear in mind this is only a guess - wait for confirmation or denial) that it's due to the fact the Sabertooth doesn't use PWM for speed control where as all of the others do.

Another solution I thought of on my way home from work was to use a custom Movement Panel with script commands to set the sabertooth to the correct values depending on speed and direction. I haven't looked at writing the code for it or the calculations and variables required but it shouldn't be difficult.

Although wait for DJ (or someone else for that matter) to confirm or deny my suspicions before marking as solved or even getting too involved in any kind of coding - there may very well be a simple solution.


The sabertooth (non R/C version) supports different control methos... Input modes: Analog, R/C, simplified serial, packetized serial... If you're right Richard I am wondering if another Movement Panel in ARC could be adapted to use with the sabertooth other than serial?


Thanks XL, but isn't the 255 the speed and the 500 the time parameter? So Forward(255,500) is supposed to move the robot forward at full speed for half a second? My problem is I want the control the "throttle" as it were of my robot via voice command...

United Kingdom

@XL-Robots - I learnt something new there, usually Forward() is Forward(speed, ms). So to make sure I have it right, where the ms usually is it's actually the sabertooth speed? What about the first number?

@rryerson - I assume DJ has already investigated all other avenues for the sabertooth control and none worked but it is possible I suppose. I haven't ever read anything about the other control methods so haven't a clue. However, my point was that scripts can be used with thee SendSerial() command to work the Sabertooth in simple serial mode. This is psudo code, I haven't a clue of the proper code but something like;

SendSerial(D0, 9600, 255)
SendSerial(D0, 9600, 127)

Which is full speed ahead on both motors. Change the 255 and 127 for lower values (not too low, it'll send it backwards) for slower speeds so;

SendSerial(D0, 9600, $motor1)
SendSerial(D0, 9600, $motor2)

Where $motor1 and $motor2 are calculated from the speed control on the custom movement panel.


Rich, your serial commands do work... Just have to figure out the values... XL when I use forward(255,500), my robot moves forward at full speed for half a second...


Thanks Rich... you serial suggestions worked like a charm. I have complete control of speed now... Going to convert most of my voice commands to serial... awesome thanks...;)


No worries XL, as I do appreciate your help too...

Cheers R