26#include <interfaces-impl/gpio_impl.h>
27#include <interfaces/delays.h>
28#include <utils/TestUtils/MockGpioPin.h>
61 miosix::GpioPin
enablePin = MockGpioPin());
90 virtual void move(int16_t steps);
miosix::GpioPin directionPin
StepperData getState(float moveDeg)
Returns the current position and the current timestamp.
virtual float getCurrentDegPosition()
Returns the current absolute position of the stepper in degrees [deg].
virtual void setSpeed(float speed)
Changes the stepper motor speed.
void setDirection()
Sets the directionPin to the right value to go in the direction stored in currentDirection.
virtual void setPosition(int16_t steps)
Set the position of the stepper motor.
Stepper(const Stepper &p)=delete
virtual void move(int16_t steps)
Move the stepper motor by the specified amount of steps.
PinConfiguration pinConfig
void zeroPosition(float degrees=0)
Overrides the driver's internal position counter.
Direction currentDirection
Stepper & operator=(const Stepper &)=delete
void moveDeg(float degrees)
Move the stepper motor by the specified amount of degrees.
int16_t getCurrentPosition()
virtual void setMicroStepping(uint16_t microStep)
Set the motor driver micro stepping configuration.
miosix::GpioPin enablePin
void setPositionDeg(float degrees)
Set the position of the stepper motor.
@ COMMON_CATHODE
All - signals connected to Gnd.
@ COMMON_ANODE
All + signals connected to Vdd (3v3)
Stepper(miosix::GpioPin stepPin, miosix::GpioPin directionPin, float speed=1, float stepAngle=1.8, bool revertDirection=false, uint16_t microStep=1, PinConfiguration pinConfiguration=PinConfiguration::COMMON_CATHODE, miosix::GpioPin enablePin=MockGpioPin())
Construct a new Stepper object.
bool isEnabled()
Returns whether the stepper is enabled or not.
This file includes all the types the logdecoder script will decode.