Adafruit Library
Public Member Functions | List of all members
seesaw_Motor Class Reference

Class that stores state and functions for seesaw motor interface. More...

#include <seesaw_motor.h>

Public Member Functions

 seesaw_Motor (Adafruit_seesaw *ss)
 class constructor More...
 
void attach (int pina, int pinb)
 attach the motor to the specified PWM pins More...
 
void throttle (float value)
 set the throttle More...
 
float getThrottle ()
 get the current throttle value More...
 

Detailed Description

Class that stores state and functions for seesaw motor interface.

Constructor & Destructor Documentation

◆ seesaw_Motor()

seesaw_Motor::seesaw_Motor ( Adafruit_seesaw ss)
inline

class constructor

Parameters
ssthe seesaw object to use

Member Function Documentation

◆ attach()

void seesaw_Motor::attach ( int  pina,
int  pinb 
)
inline

attach the motor to the specified PWM pins

Parameters
pinathe positive pin to use
pinbthe negative pin to use

◆ throttle()

void seesaw_Motor::throttle ( float  value)
inline

set the throttle

Parameters
valuethe throttle value to set between -1 and 1. Passing 0 will turn the motor off.

◆ getThrottle()

float seesaw_Motor::getThrottle ( )
inline

get the current throttle value

Returns
the current throttle value between -1 and 1

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