uStepper S-lite
|
Prototype of class for accessing all features of the TMC2208 in a single object. More...
#include <TMC2208.h>
Public Member Functions | |
Tmc2208 (void) | |
Constructor. More... | |
void | setup (void) |
Initializes the different parts of the TMC2208 object. More... | |
void | disableDriver (void) |
Disable the stepper motor driver - TMC2208. More... | |
void | enableDriver (void) |
Enable the stepper motor driver - TMC2208. More... | |
void | setCurrent (uint8_t runPercent, uint8_t holdPercent) |
Change run and hold current settings of the stepper motor driver - TMC2208. More... | |
void | setHoldCurrent (uint8_t holdPercent) |
Change hold current setting of the stepper motor driver - TMC2208. More... | |
void | setRunCurrent (uint8_t runPercent) |
Change run current setting of the stepper motor driver - TMC2208. More... | |
void | setVelocity (float RPM) |
Set motor velocity in RPM. More... | |
void | invertDirection (bool normal=INVERSEDIRECTION) |
Invert motor direction. More... | |
float | getRunCurrent (void) |
float | getHoldCurrent (void) |
Protected Attributes | |
uint8_t | runCurrent |
uint8_t | holdCurrent |
Prototype of class for accessing all features of the TMC2208 in a single object.
This class enables the user of the library to access the implemented features of the TMC2208 driver, by use of a single object.
Tmc2208::Tmc2208 | ( | void | ) |
Constructor.
This is the constructor of the TMC2208 class.
Definition at line 109 of file TMC2208.cpp.
void Tmc2208::disableDriver | ( | void | ) |
Disable the stepper motor driver - TMC2208.
This function lets the user disable the stepper driver.
Definition at line 155 of file TMC2208.cpp.
void Tmc2208::enableDriver | ( | void | ) |
Enable the stepper motor driver - TMC2208.
This function lets the user enable the stepper driver.
Definition at line 150 of file TMC2208.cpp.
void Tmc2208::invertDirection | ( | bool | normal = INVERSEDIRECTION | ) |
Invert motor direction.
This function lets the user invert the motor direction - i.e. changing CW to CCW and vise versa.
normal | - Can be set to either INVERSEDIRECTION or NORMALDIRECTION. |
Definition at line 133 of file TMC2208.cpp.
void Tmc2208::setCurrent | ( | uint8_t | runPercent, |
uint8_t | holdPercent | ||
) |
Change run and hold current settings of the stepper motor driver - TMC2208.
This function lets the user manipulate both run and hold current settings. Arguments accept natural number from zero (0) to hundred (100). Calls setCurrent and setHoldCurrent.
runPercent | - Run current in percentage of max current i.e. from 0 to 100. |
holdPercent | - Hold current in percentage of max current i.e. from 0 to 100. |
Definition at line 196 of file TMC2208.cpp.
void Tmc2208::setHoldCurrent | ( | uint8_t | holdPercent | ) |
Change hold current setting of the stepper motor driver - TMC2208.
This function lets the user manipulate hold current. Arguments accept natural number from zero (0) to hundred (100).
holdPercent | - Hold current in percentage of max current i.e. from 0 to 100. |
Definition at line 215 of file TMC2208.cpp.
void Tmc2208::setRunCurrent | ( | uint8_t | runPercent | ) |
Change run current setting of the stepper motor driver - TMC2208.
This function lets the user manipulate run current. Arguments accept natural number from zero (0) to hundred (100).
runPercent | - Run current in percentage of max current i.e. from 0 to 100. |
Definition at line 202 of file TMC2208.cpp.
void Tmc2208::setup | ( | void | ) |
Initializes the different parts of the TMC2208 object.
This function initializes the different parts of the TMC2208 object, and is called in the setup() function of the uStepper S-lite object. This function is needed to setup basic registers of the TMC2208.
Definition at line 114 of file TMC2208.cpp.
void Tmc2208::setVelocity | ( | float | RPM | ) |
Set motor velocity in RPM.
This function lets the user command a run speed in RPM for open loop speed control.
RPM | - Desired speed of the motor in RPM. |
Definition at line 228 of file TMC2208.cpp.
|
protected |
|
protected |