1 #ifndef _SEESAW_MOTOR_H 2 #define _SEESAW_MOTOR_H 48 if (_pina < 0 || _pinb < 0)
51 value = constrain(value, -1.0, 1.0);
53 uint16_t absolute = fabs(value) * 65535;
58 }
else if (value < 0) {
void throttle(float value)
set the throttle
Definition: seesaw_motor.h:47
Class that stores state and functions for seesaw motor interface.
Definition: seesaw_motor.h:11
Class that stores state and functions for interacting with seesaw helper IC.
Definition: Adafruit_seesaw.h:235
void attach(int pina, int pinb)
attach the motor to the specified PWM pins
Definition: seesaw_motor.h:35
float getThrottle()
get the current throttle value
Definition: seesaw_motor.h:74
virtual void analogWrite(uint8_t pin, uint16_t value, uint8_t width=8)
write a PWM value to a PWM-enabled pin
Definition: Adafruit_seesaw.cpp:509
seesaw_Motor(Adafruit_seesaw *ss)
class constructor
Definition: seesaw_motor.h:19