Controls a USB-enabled Sabertooth motor driver running in Packet Serial mode.
Inheritance Hierarchy
DimensionEngineeringUsbSabertooth
Namespace: DimensionEngineering
Assembly: DimensionEngineering.Sabertooth (in DimensionEngineering.Sabertooth.dll) Version: 1.6.0.0 (1.6.0.0)
Syntax
The UsbSabertooth type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UsbSabertooth |
Initializes a new instance of the UsbSabertooth class.
The driver address is set to 128. Be sure to set Connection.
| |
UsbSabertooth(UsbSabertoothSerial) |
Initializes a new instance of the UsbSabertooth class.
The driver address is set to 128. The specified serial connection is used.
|
Methods
Name | Description | |
---|---|---|
Command(Byte, Byte) |
Sends a packet serial command to the motor driver.
| |
Command(Byte, Byte) |
Sends a multibyte packet serial command to the motor driver.
| |
Drive |
Controls the mixed-mode drive channel.
In User Mode, this sets MD.
| |
Freewheel(Boolean) |
Causes motor output 1 to freewheel.
In User Mode, this sets Q1.
| |
Freewheel(Int32) |
Causes motor output 1 to freewheel.
In User Mode, this sets Q1.
| |
Freewheel(Int32, Boolean) |
Causes the specified motor output to freewheel.
In User Mode, this sets Q1 or Q2.
| |
Freewheel(Int32, Int32) |
Causes the specified motor output to freewheel.
In User Mode, this sets Q1 or Q2.
| |
FromHidStream |
Initializes a new instance of the UsbSabertooth class
that communicates over the USB HID protocol.
| |
Get |
Gets a value from the motor driver.
| |
GetBattery(Int32) |
Gets the battery voltage.
| |
GetBattery(Int32, Boolean) |
Gets the battery voltage.
| |
GetCurrent(Int32) |
Gets the motor output current.
| |
GetCurrent(Int32, Boolean) |
Gets the motor output current.
| |
GetSpecial |
Gets a special value from the motor driver.
| |
GetTemperature(Int32) |
Gets the motor output temperature.
| |
GetTemperature(Int32, Boolean) |
Gets the motor output temperature.
| |
KeepAlive |
Resets the serial timeout.
This is done automatically any time a motor output is set.
You can, however, call this if you don't want to set any motor outputs.
| |
Motor(Int32) |
Controls motor output 1.
In User Mode, this sets M1.
| |
Motor(Int32, Int32) |
Controls the specified motor output.
In User Mode, this sets M1 or M2.
| |
Power(Int32) |
Controls power output 1, if power output 1 is configured as a controllable output.
In User Mode, this sets P1.
| |
Power(Int32, Int32) |
Controls the specified power output, if the power output is configured as a controllable output.
In User Mode, this sets P1 or P2.
| |
Set |
Sets a value on the motor driver.
| |
SetCurrentLimit(Int32) |
Sets the current limit for all motor outputs.
In User Mode, this sets T1 and T2.
2014-06-09 and newer firmwares support changing the current limit while running.
| |
SetCurrentLimit(Int32, Int32) |
Sets the current limit for the specified motor output.
In User Mode, this sets T1 or T2.
2014-06-09 and newer firmwares support changing the current limit while running.
| |
SetRamping(Int32) |
Sets the ramping for all motor outputs.
In User Mode, this sets R1 and R2.
| |
SetRamping(Int32, Int32) |
Sets the ramping for the specified motor output.
In User Mode, this sets R1 or R2.
| |
SetTimeout |
Sets the serial timeout.
| |
ShutDown |
Shuts down an output.
| |
Turn |
Controls the mixed-mode turn channel.
In User Mode, this sets MT.
|
Fields
Name | Description | |
---|---|---|
GetTimedOut |
Get requests return this value if they time out.
|
Properties
Name | Description | |
---|---|---|
Address |
Gets or sets the driver address. The default is 128.
| |
Connection |
Gets or sets the serial connection being used.
| |
GetRetryInterval |
Gets or sets the get retry interval, in milliseconds.
| |
GetTimeout |
Gets or sets the get timeout, in milliseconds.
| |
UsingCrc |
Gets whether CRC-protected commands are used. They are, by default.
|
See Also