Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6164
     Vinay KRI
    Participant

    I turned down the 1 and 2 button down but now it is not moving at all do I have to change something in the program.
    This is my following program(below) I have changed the Shared line code a little bit.
    with the following code the motors simply moved with 1 3 and 5 on.
    Only single motor followed command the other only moved in one direction though the command was changed to ST1[0].motor(1, -10);

    #include <Sabertooth.h>

    // Up to 8 Sabertooth/SyRen motor drivers can share the same S1 line.
    // This sample uses three: address 128 and 129 on ST1[0] and ST1[2],
    // and address 130 on ST2.
    Sabertooth ST1[2] = { Sabertooth(128), Sabertooth(129) };
    Sabertooth ST2(130);

    void setup()
    {
    SabertoothTXPinSerial.begin(9600);
    //Sabertooth::autobaud(SabertoothTXPinSerial); // Autobaud is for the whole serial line — you don’t need to do
    // it for each individual motor driver. This is the version of
    // the autobaud command that is not tied to a particular
    // Sabertooth object.
    // See the examples in 1.Basics for information on whether you
    // need this line at all.
    }

    void loop()
    {
    // ST1[0] (address 128) has power 50 (of 127 max) on M1,
    // ST1[1] (address 129) has power 60 (of 127 max) on M2, and

    Serial.println(“first loop motor1”);
    ST1[0].motor(1, 10);
    delay(100);
    Serial.println(“second loop motor 2”);
    ST1[1].motor(2, 10);

    delay(3000);

    Serial.println(“second loop motor 1”);
    ST1[0].motor(1, 0);
    delay(100);
    Serial.println(“second loop motor 2”);
    ST1[1].motor(2, 0);

    delay(3000);
    }

    Can you please let me know what to change for packet control in the code and for packet code I have set the dip switches to 3 4 and 6 on.
    I need to move single motor in front, reverse and should be able to stop the motor when given the command.

    Thank you in advance

    #6162
     Vinay KRI
    Participant

    Hello I am having same difficulty I have set the sabertooth to the simple serial mode and I am using Arduino Mega and have made the connection as per the manual, I am running the codes which were provided by the sabertooth arduino library (Shared line).

    I have connected the sabertooth to two motors and when I upload the shared line program one motor follows the instruction as the program but the other will be rotating independently without control, can you please help me in controlling the two motors independently with the micrcontroller.

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