SyRen/Sabertooth Packet Serial Library for Arduino: C:/Code/src/contract/sabertooth-arduino/Sabertooth/Sabertooth.h Source File
From SyRen/Sabertooth Packet Serial Library for Arduino
|
SyRen/Sabertooth Packet Serial Library for Arduino
Control your SyRen or Sabertooth with reliable Packet Serial.
|
22 #if defined(ARDUINO) && ARDUINO >= 100
24 typedef Stream SabertoothStream;
27 typedef Print SabertoothStream;
31 #define SabertoothTXPinSerial Serial1 // Arduino Leonardo has TX->1 on Serial1, not Serial.
33 #define SabertoothTXPinSerial Serial
35 #define SyRenTXPinSerial SabertoothTXPinSerial
64 inline byte
address()
const {
return _address; }
70 inline SabertoothStream&
port()
const {
return _port; }
76 void autobaud(
boolean dontWait =
false)
const;
83 static void autobaud(SabertoothStream& port,
boolean dontWait =
false);
97 void motor(
int power)
const;
110 void drive(
int power)
const;
116 void turn(
int power)
const;
172 void throttleCommand(byte
command,
int power)
const;
176 SabertoothStream& _port;