Controls a Sabertooth motor driver running in Simplified Serial mode. More...
#include <SabertoothSimplified.h>
Public Member Functions | |
void | drive (int power) |
void | motor (int power) |
void | motor (byte motor, int power) |
SabertoothSimplified () | |
SabertoothSimplified (Print &port) | |
void | stop () |
void | turn (int power) |
Private Member Functions | |
void | mixedMode (boolean enable) |
void | mixedUpdate () |
void | raw (byte motor, int power) |
Private Attributes | |
boolean | _mixed |
int | _mixedDrive |
boolean | _mixedDriveSet |
int | _mixedTurn |
boolean | _mixedTurnSet |
Print & | _port |
Controls a Sabertooth motor driver running in Simplified Serial mode.
Definition at line 39 of file SabertoothSimplified.h.
Initializes a new instance of the SabertoothSimplified class. The Arduino TX serial port is used.
Definition at line 21 of file SabertoothSimplified.cpp.
SabertoothSimplified::SabertoothSimplified | ( | Print & | port | ) |
Initializes a new instance of the SabertoothSimplified class. The specified serial port is used.
port | The port to use. |
Definition at line 27 of file SabertoothSimplified.cpp.
void SabertoothSimplified::drive | ( | int | power | ) |
Sets the driving power.
power | The power, between -127 and 127. |
Definition at line 44 of file SabertoothSimplified.cpp.
void SabertoothSimplified::mixedMode | ( | boolean | enable | ) | [private] |
Definition at line 67 of file SabertoothSimplified.cpp.
void SabertoothSimplified::mixedUpdate | ( | ) | [private] |
Definition at line 75 of file SabertoothSimplified.cpp.
void SabertoothSimplified::motor | ( | int | power | ) |
Sets the power of motor 1.
power | The power, between -127 and 127. |
Definition at line 33 of file SabertoothSimplified.cpp.
void SabertoothSimplified::motor | ( | byte | motor, |
int | power | ||
) |
Sets the power of the specified motor.
motor | The motor number, 1 or 2. |
power | The power, between -127 and 127. |
Definition at line 38 of file SabertoothSimplified.cpp.
void SabertoothSimplified::raw | ( | byte | motor, |
int | power | ||
) | [private] |
Definition at line 82 of file SabertoothSimplified.cpp.
void SabertoothSimplified::stop | ( | ) |
Stops.
Definition at line 60 of file SabertoothSimplified.cpp.
void SabertoothSimplified::turn | ( | int | power | ) |
Sets the turning power.
power | The power, between -127 and 127. |
Definition at line 52 of file SabertoothSimplified.cpp.
boolean SabertoothSimplified::_mixed [private] |
Definition at line 92 of file SabertoothSimplified.h.
int SabertoothSimplified::_mixedDrive [private] |
Definition at line 93 of file SabertoothSimplified.h.
boolean SabertoothSimplified::_mixedDriveSet [private] |
Definition at line 94 of file SabertoothSimplified.h.
int SabertoothSimplified::_mixedTurn [private] |
Definition at line 93 of file SabertoothSimplified.h.
boolean SabertoothSimplified::_mixedTurnSet [private] |
Definition at line 94 of file SabertoothSimplified.h.
Print& SabertoothSimplified::_port [private] |
Definition at line 95 of file SabertoothSimplified.h.