Sabertooth2X12 Setup with Arduino Mega 2560

Circuit Connection

Using Arduino to control a Sabertooth motor driver is very easy. Please don't get confused with the multiple modes that a Sabertooth driver provides you. The following picture demonstrates an easy connection.
That is it!


Arduino Program

The Arduino program to control the motor is also very simple by using the Servo library:
#include <Servo.h>
Servo myservo;

void setup () {
  myservo.attach(14); // Use PWM pin 14 to control Sabertooth.

void loop() {  
  // 0 means full power in one direction.
  // Actually the minimum value for me is around 30.
  // A smaller value won't drive the motor.
  // 90 means stopping the motor.
  // 180 means full power in the other direction.
  // Actually the maximum value for me is around 160.
  // A larger value won't drive the motor either.


Here is a video to see the motor moving in one direction for 2 seconds, stops for 2 seconds, and moves in the opposite direction for 2 seconds: