
Kalinox
Hello,
I do not know if the subject has already been treated.
I buy a 2X5 sabertooth I configure like this: http://www.ez-robot.com/Tutorials/Help.aspx?id=173
I control my motors with a joystick gamepad with the joystick panel, it works.
The problem is that it is all or nothing: the motors run in full speed or not run.
I will wish that I push the joystick a little, the engines run slowly and more quickly when I push the joystick away.
A kind of analog response in fact.
Does anyone have an idea of ??configuration?
So what you need to do is use the Joystick variables to change the SendSerial command.
Code:
So you change the data to suit. You can use EZ-Script to get the Joystick variable and convert it to a number between 1 and 127 for forwards, depending on the Y value of the joystick, or 128 and 255 if reverse.
I don't have a Sabertooth to play with so can't really offer much more than that. The documentation I just read wasn't exactly great since it said it's 1-127 for forward and 1-127 for reverse too...
But some code example, which needs to be adjusted to suit (I also don't have ARC to hand so my joystick variable may be wrong);
Code:
Something like that.
Of course, there may be a place in the joystick control for putting the script which may remove some of the code, without ARC I am unsure as I don't use a joystick so have limited knowledge on that part.
Your numbers (@purple) are probably the correct ones
After several tries, the simplest was to configure my sabertooth in R/C and configure the joystick setting in "joystick servo control"
It works perfectly
And I chosen the speed maximal of motor by adjusting the min and max servo position in Joystick setting.
What I shall like making, it is to be able to modify these min and max servo position via a script: when I will press on a button of my gamepad, it makes pass in mode "superior speed "
Have you an idea for this ?