Tagged: mecanum sabertooth
This topic has 3 replies, 2 voices, and was last updated 4 years, 9 months ago by Scott Murchison.
- AuthorPosts
- March 10, 2020 at 10:32 am #7462Scott MurchisonParticipant
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?
March 10, 2020 at 10:51 am #7463SuperDroidKeymasterHi 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 forwardST1.motor(2,-127); //address 128, motor 2 full power reverse
ST2.motor(2,-127); //address 129, motor 2 full power reverse.hopefully this helps!
March 10, 2020 at 11:10 am #7464Scott MurchisonParticipantI’ll try it and report back. Thanks.
March 10, 2020 at 2:19 pm #7469Scott MurchisonParticipantGot it working. I wrote one routine for CW and another for CCW. Thanks.
- AuthorPosts
You must be logged in to reply to this topic.