Exploring BeagleBone
V1.0
|
A class to control a stepper motor using a motor driver board, such as the Easy Driver board, or compatible. The class uses five GPIOs to control each motor. More...
#include <StepperMotor.h>
Public Types | |
enum | STEP_MODE { STEP_FULL, STEP_HALF, STEP_QUARTER, STEP_EIGHT } |
enum | DIRECTION { CLOCKWISE, ANTICLOCKWISE } |
Public Member Functions | |
StepperMotor (GPIO *gpio_MS1, GPIO *gpio_MS2, GPIO *gpio_STEP, GPIO *gpio_SLP, GPIO *gpio_DIR, int speedRPM=60, int stepsPerRevolution=200) | |
StepperMotor (int gpio_MS1, int gpio_MS2, int gpio_STEP, int gpio_SLP, int gpio_DIR, int speedRPM=60, int stepsPerRevolution=200) | |
virtual void | step () |
virtual void | step (int numberOfSteps) |
virtual int | threadedStepForDuration (int numberOfSteps, int duration_ms) |
virtual void | threadedStepCancel () |
virtual void | rotate (float degrees) |
virtual void | setDirection (DIRECTION direction) |
virtual DIRECTION | getDirection () |
virtual void | reverseDirection () |
virtual void | setStepMode (STEP_MODE mode) |
virtual STEP_MODE | getStepMode () |
virtual void | setSpeed (float rpm) |
virtual float | getSpeed () |
virtual void | setStepsPerRevolution (int steps) |
virtual int | getStepsPerRevolution () |
virtual void | sleep () |
virtual void | wake () |
virtual bool | isAsleep () |
virtual | ~StepperMotor () |
Friends | |
void * | threadedStep (void *value) |
A class to control a stepper motor using a motor driver board, such as the Easy Driver board, or compatible. The class uses five GPIOs to control each motor.
exploringBB::StepperMotor::StepperMotor | ( | GPIO * | gpio_MS1, |
GPIO * | gpio_MS2, | ||
GPIO * | gpio_STEP, | ||
GPIO * | gpio_SLP, | ||
GPIO * | gpio_DIR, | ||
int | speedRPM = 60 , |
||
int | stepsPerRevolution = 200 |
||
) |
exploringBB::StepperMotor::StepperMotor | ( | int | gpio_MS1, |
int | gpio_MS2, | ||
int | gpio_STEP, | ||
int | gpio_SLP, | ||
int | gpio_DIR, | ||
int | speedRPM = 60 , |
||
int | stepsPerRevolution = 200 |
||
) |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
friend |