111 void attach(uint8_t
pin, uint16_t min = 544, uint16_t max = 2400,
bool reverse =
false)
133 write16bit((uint16_t)(65536uL * angle / 180));
164 return (uint8_t)(returnval >> 16);
177 _sw.sendPacket(tx, rx);
179 _sw.sendPacket(tx2, rx);
279 void attach(uint8_t
pin, uint16_t min , uint16_t max ,
bool reverse =
false)
297 return _sw.sendPacket(tx, rx);
#define SW_LE16(_a)
Convert a uint16_t to two bytes in little endian format for array initialization.
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
SerialWombatAbstractScaledOutput(SerialWombatChip &sw)
Constructor for the SerialWombatAbstractScaledOutput Class.
SerialWombatPin(SerialWombatChip &serialWombatChip)
Instantiates a Serial Wombat Pin.
uint8_t pin()
Returns the current SW pin number. Used primarily for virtual calls by derived classes.
void write16bit(uint16_t position)
Writes a 16 bit value to the servo.
uint8_t read(void)
returns the last position of the servo scaled to a number from 0 to 180.
void attach(uint8_t pin, uint16_t min=544, uint16_t max=2400, bool reverse=false)
Initialize a servo on the specified pin.
void write(uint8_t angle)
Writes a value to the servo.
void attach(uint8_t pin, bool reverse)
Initialize a servo on the specified pin.
SerialWombatServo(SerialWombatChip &sw)
Constructor for the SerialWombatServo Class.
SerialWombatServo_18AB(SerialWombatChip &serialWombat)
uint8_t pin()
Facilitates inheritance.
uint8_t swPinModeNumber()
Facilitates inheritance.
SerialWombatHighFrequencyServo(SerialWombatChip &serialWombat)
int16_t writeFrequency_Hz(uint16_t frequency_hZ)
int16_t writePeriod_uS(uint16_t period_uS)
void attach(uint8_t pin, uint16_t min, uint16_t max, bool reverse=false)
Initialize a high Speed servo on the specified pin.
void attach(uint8_t pin, bool reverse)
Do not use this interface for High Frequency Servos.