MechaLib
The robust, all-in-one software library for MechaLeague Robots
Loading...
Searching...
No Matches
SERVO_Base Class Referenceabstract

#include <SERVO_Base.h>

Detailed Description

Recomended PWM pins: 2,4,12-19,21-23,25-27,32-33

Public Member Functions

virtual void begin ()=0
 Begin the servo motor.
virtual void set (float rotation)=0
 Set the rotation (percent) of the servo motor.
void setAngle (int angle)
 Set the angle (degrees) of the servo motor.
virtual SERVO_Base ** getFollowers ()
 Get the followers for the servo motor.
virtual void updateFollowers (float rotation)
 Update the followers of the servo motor.

Protected Attributes

int minDeg = 0
int maxDeg = 180
int inverted = 0
int offset = 0
int minPulse = 1000
int maxPulse = 2000
SERVO_Basefollowers [2] = {}

Member Function Documentation

◆ begin()

virtual void SERVO_Base::begin ( )
pure virtual

Begin the servo motor.

◆ getFollowers()

virtual SERVO_Base ** SERVO_Base::getFollowers ( )
inlinevirtual

Get the followers for the servo motor.

Returns
The followers for the servo motor

◆ set()

virtual void SERVO_Base::set ( float rotation)
pure virtual

Set the rotation (percent) of the servo motor.

Parameters
rotationThe rotation (percent) to set the servo motor to

◆ setAngle()

void SERVO_Base::setAngle ( int angle)
inline

Set the angle (degrees) of the servo motor.

Parameters
angleThe angle (degrees) to set the servo motor to

◆ updateFollowers()

virtual void SERVO_Base::updateFollowers ( float rotation)
inlinevirtual

Update the followers of the servo motor.

Parameters
speedThe speed to set the followers to servo motor internally calls this, not necessary to call this externally

Field Documentation

◆ followers

SERVO_Base* SERVO_Base::followers[2] = {}
protected

◆ inverted

int SERVO_Base::inverted = 0
protected

◆ maxDeg

int SERVO_Base::maxDeg = 180
protected

◆ maxPulse

int SERVO_Base::maxPulse = 2000
protected

◆ minDeg

int SERVO_Base::minDeg = 0
protected

◆ minPulse

int SERVO_Base::minPulse = 1000
protected

◆ offset

int SERVO_Base::offset = 0
protected

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