28 miosix::GpioPin directionPin,
float speed,
29 float stepAngle,
bool revertDirection,
31 miosix::GpioPin enablePin)
32 :
Stepper(stepPin, directionPin, speed, stepAngle, revertDirection,
33 microStep, pinConfiguration, enablePin),
This class generates a PWM signal for a chosen number of pulses.
uint16_t getTargetCount()
Allows to get the target periods count while the timers are generating the signal.
void updateCurrentCount(uint16_t count)
Allows to update the current periods count while the timers are generating the signal.
void generatePulses(uint16_t pulses)
Triggers the generation of a specific number of PWM periods.
void updateTargetCount(uint16_t pulses)
Allows to update the target periods count while the timers are generating the signal.
void setFrequency(unsigned int pulseFrequency)
uint16_t getCurrentCount()
Returns the number of periods counted until now.
void setDirection()
Sets the directionPin to the right value to go in the direction stored in currentDirection.
Direction currentDirection
virtual void setMicroStepping(uint16_t microStep)
Set the motor driver micro stepping configuration.
StepperPWM(CountedPWM &pwm, 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 StepperPWM object.
float getCurrentDegPosition() override
Returns the current angle of the stepper.
void move(int16_t steps) override
Move the stepper motor by the specified amount of steps.
void setMicroStepping(uint16_t microStep) override
Set the motor driver micro stepping configuration.
void setSpeed(float speed) override
Changes the stepper motor speed.
This file includes all the types the logdecoder script will decode.