RSeries astromech firmware
CytronSmartDriveDuoDriver Class Reference

#include <motor/CytronSmartDriveDuoDriver.h>

+ Inheritance diagram for CytronSmartDriveDuoDriver:

Public Member Functions

 CytronSmartDriveDuoDriver (byte address, Stream &port, uint8_t initialByte=0x80)
 
byte address () const
 
void setAddress (byte addr)
 
void autobaud (boolean dontWait=false) const
 
void turn (int power)
 
void drive (int power)
 
void motor (int power)
 
void motor (int powerLeft, int powerRight)
 
void stop ()
 
void setDeadband (byte value)
 
void setTimeout (int milliseconds)
 

Constructor & Destructor Documentation

◆ CytronSmartDriveDuoDriver()

CytronSmartDriveDuoDriver::CytronSmartDriveDuoDriver ( byte  address,
Stream &  port,
uint8_t  initialByte = 0x80 
)
inline

Initializes a new instance of the Sabertooth class. The driver address is set to the value given, and the specified serial port is used.

Parameters
addressThe driver address.
portThe port to use.

Member Function Documentation

◆ address()

byte CytronSmartDriveDuoDriver::address ( ) const
inline

Gets the driver address.

Returns
The driver address.

◆ autobaud()

void CytronSmartDriveDuoDriver::autobaud ( boolean  dontWait = false) const
inline

Sends the autobaud character.

Parameters
dontWaitIf false, a delay is added to give the driver time to start up.

◆ drive()

void CytronSmartDriveDuoDriver::drive ( int  power)
inline

Sets the driving power.

Parameters
powerThe power, between -127 and 127.

◆ motor() [1/2]

void CytronSmartDriveDuoDriver::motor ( int  power)
inline

◆ motor() [2/2]

void CytronSmartDriveDuoDriver::motor ( int  powerLeft,
int  powerRight 
)
inline

Independent motor command.

Parameters
powerThe power, between -127 and 127.

◆ setAddress()

void CytronSmartDriveDuoDriver::setAddress ( byte  addr)
inline

Sets the driver address.

Returns
The driver address.

◆ setDeadband()

void CytronSmartDriveDuoDriver::setDeadband ( byte  value)
inline

◆ setTimeout()

void CytronSmartDriveDuoDriver::setTimeout ( int  milliseconds)
inline

◆ stop()

void CytronSmartDriveDuoDriver::stop ( )
inline

◆ turn()

void CytronSmartDriveDuoDriver::turn ( int  power)
inline

Sets the turning power.

Parameters
powerThe power, between -127 and 127.

The documentation for this class was generated from the following file: