uStepper S
|
Prototype of class for ustepper servo. More...
#include <uStepperServo.h>
Public Member Functions | |
void | setup (void) |
uStepperServo () | |
Constructor for servo class. More... | |
void | write (int angleArg) |
Specify angle of servo motor. More... | |
void | setMinimumPulse (float us) |
Sets the minimum pulse. More... | |
void | setMaximumPulse (float us) |
Sets the maximum pulse. More... | |
Private Attributes | |
uint8_t | angle |
uint16_t | pulse |
uint16_t | min16 |
uint16_t | max16 |
Prototype of class for ustepper servo.
Definition at line 47 of file uStepperServo.h.
uStepperServo::uStepperServo | ( | ) |
Constructor for servo class.
This constructor is used to instantiate a new servo class, and should be used for each servo the user wishes to connect to the uStepper.
Definition at line 75 of file uStepperServo.cpp.
void uStepperServo::setMaximumPulse | ( | float | us | ) |
Sets the maximum pulse.
This method sets the maximum pulse length given to the servo motor. This pulse length defines the fully open angle.
[in] | t | Maximum pulse width in microseconds |
Definition at line 100 of file uStepperServo.cpp.
void uStepperServo::setMinimumPulse | ( | float | us | ) |
Sets the minimum pulse.
This method sets the minimum pulse length given to the servo motor. This pulse length defines the fully closed angle.
[in] | t | Minimum pulse width in microseconds |
Definition at line 95 of file uStepperServo.cpp.
void uStepperServo::setup | ( | void | ) |
void uStepperServo::write | ( | int | angleArg | ) |
Specify angle of servo motor.
This method sets an angle setpoint for the servo motor
[in] | angleArg | The angle argument |
Definition at line 105 of file uStepperServo.cpp.
|
private |
Current angle in degrees
Definition at line 51 of file uStepperServo.h.
|
private |
Maximum pulse width in timer0 ticks (default = 150 = 2.4ms)
Definition at line 57 of file uStepperServo.h.
|
private |
Minimum pulse width in timer0 ticks (default = 92 = 1.472ms)
Definition at line 55 of file uStepperServo.h.
|
private |
Pulse width in timer0 ticks (1 tick = 16us)
Definition at line 53 of file uStepperServo.h.