31 #include <mraa/pwm.hpp>
32 #include <mraa/common.hpp>
33 #include <mraa/gpio.hpp>
88 StepMotor (
int dirPin,
int stePin,
int steps = 200,
int enPin = -1);
117 mraa::Result
step (
int ticks);
159 mraa::Gpio m_dirPinCtx;
160 mraa::Gpio m_stePinCtx;
161 mraa::Gpio *m_enPinCtx;
167 mraa::Result dirForward ();
168 mraa::Result dirBackward ();
170 void delayus (
int us);
mraa::Result stepBackward(int ticks)
Definition: stepmotor.cxx:119
int getStep()
Definition: stepmotor.cxx:140
mraa::Result stepForward(int ticks)
Definition: stepmotor.cxx:108
StepMotor(int dirPin, int stePin, int steps=200, int enPin=-1)
Definition: stepmotor.cxx:36
void enable(bool flag)
Definition: stepmotor.cxx:79
mraa::Result step(int ticks)
Definition: stepmotor.cxx:99
~StepMotor()
Definition: stepmotor.cxx:73
void setSpeed(int speed)
Definition: stepmotor.cxx:89
API for the Stepper Motor.
Definition: stepmotor.h:78
int getPosition()
Definition: stepmotor.cxx:135
void setPosition(int pos)
Definition: stepmotor.cxx:130