This topic has 3 replies, 2 voices, and was last updated 4 years ago by Scott Murchison.

  • Author
    Posts
  • #7462
     Scott Murchison
    Participant

    My robot has two Sabertooth controllers for the four Mecanum wheels. Wheels LF (left front) and RR (right rear) are wired to one Sabertooth and wheels RF (right front) and LR (left rear) are wired to the other. This works for vectoring in any direction, but how can I make the robot spin on its axis? Correct me if I’m wrong, but to spin, don’t I need to make the wheels on one side (FR and RR) spin one way and the other set (FL and RL) spin the other? I’m using packetized serial mode. One controller is address 128 and the other 129. To spin, I’d have to make the two motors on each controller spin in opposite directions. Am I missing something?

    #7463
     SuperDroid
    Keymaster

    Hi Scott,
    If you are using the Sabertooth Arduino library, you should be able to just set the motor to spin by using the code below.

    Sabertooth ST1(128);
    Sabertooth ST2(129); // put these at the top of your code to specify each motor controller.

    ST1.motor(1,127); //address 128, motor 1 full power forward
    ST2.motor(1,127); //address 129, motor 1 full power forward

    ST1.motor(2,-127); //address 128, motor 2 full power reverse
    ST2.motor(2,-127); //address 129, motor 2 full power reverse.

    hopefully this helps!

    #7464
     Scott Murchison
    Participant

    I’ll try it and report back. Thanks.

    #7469
     Scott Murchison
    Participant

    Got it working. I wrote one routine for CW and another for CCW. Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Login Register

©2024 SDRobots.com | All rights reserved.

Log in with your credentials

or    

Forgot your details?

Create Account