Sabertooth Simplified Serial Library for Arduino: SabertoothSimplified Class Reference

Sabertooth Simplified Serial Library

Sabertooth Simplified Serial Library for Arduino
Control your Sabertooth with Simplified Serial.
SabertoothSimplified Class Reference

Controls a Sabertooth motor driver running in Simplified Serial mode. More...

Public Member Functions

 SabertoothSimplified ()
 
 SabertoothSimplified (Print &port)
 
void motor (int power)
 
void motor (byte motor, int power)
 
void drive (int power)
 
void turn (int power)
 
void stop ()
 

Detailed Description

Controls a Sabertooth motor driver running in Simplified Serial mode.

Examples:
SimpleExample/SimpleExample.ino, SoftwareSerial/SoftwareSerial.ino, Sweep/Sweep.ino, and TankStyleSweep.ino.

Constructor & Destructor Documentation

SabertoothSimplified::SabertoothSimplified ( )

Initializes a new instance of the SabertoothSimplified class. The Arduino TX serial port is used.

SabertoothSimplified::SabertoothSimplified ( Print &  port)

Initializes a new instance of the SabertoothSimplified class. The specified serial port is used.

Parameters
portThe port to use.

Member Function Documentation

void SabertoothSimplified::drive ( int  power)

Sets the driving power.

Parameters
powerThe power, between -127 and 127.
Examples:
TankStyleSweep.ino.
void SabertoothSimplified::motor ( int  power)

Sets the power of motor 1.

Parameters
powerThe power, between -127 and 127.
Examples:
SimpleExample/SimpleExample.ino, and Sweep/Sweep.ino.
void SabertoothSimplified::motor ( byte  motor,
int  power 
)

Sets the power of the specified motor.

Parameters
motorThe motor number, 1 or 2.
powerThe power, between -127 and 127.
void SabertoothSimplified::stop ( )

Stops.

void SabertoothSimplified::turn ( int  power)

Sets the turning power.

Parameters
powerThe power, between -127 and 127.
Examples:
TankStyleSweep.ino.