Class AsyncStepperRotator

  • All Implemented Interfaces:
    crackers.kobots.parts.movement.async.AsyncActuator , crackers.kobots.parts.movement.async.AsyncRotator

    
    public class AsyncStepperRotator
     implements AsyncRotator
                        

    An asynchronous stepper rotator that smoothly rotates a stepper motor to a specified angle using easing functions.

    This is built on top of BasicStepperRotator to provide asynchronous movement capabilities. The stepPause parameter is provided to introduce a delay between steps to prevent overdriving the stepper motor or driver circuits (e.g. "slow" response from the hardware).

    NOTE The stepper is not automatically released after movement; it is assumed that holding torque is desired.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncStepperRotator(BasicStepperMotor theStepper, Float gearRatio, Boolean reversed, BasicStepperController.StepStyle stepStyle, Duration stepPause)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final BasicStepperRotator getWrapped()
      Integer getCurrent() Return some notion of the "current" position/value of the actuator.
      final BasicStepperMotor getTheStepper()
      <Error class: unknown class> rotateAsync(Integer angle, Duration time, Function1<Float, Float> easing) The basic asynchronous rotation function.
      Unit release() Release the stepper motor, allowing it to be turned freely.
      • Methods inherited from class crackers.kobots.parts.movement.async.AsyncRotator

        smoothMove, softLanding, softLaunch
      • Methods inherited from class crackers.kobots.parts.movement.async.AsyncActuator

        myLittleKillSwitch, stopCheck
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsyncStepperRotator

        AsyncStepperRotator(BasicStepperMotor theStepper, Float gearRatio, Boolean reversed, BasicStepperController.StepStyle stepStyle, Duration stepPause)
        Parameters:
        theStepper - The stepper motor to be controlled.
        gearRatio - The gear ratio of the stepper motor.
        reversed - Whether the stepper motor direction is reversed.
        stepStyle - The stepping style to use for the stepper motor.
        stepPause - The pause duration between steps (default is 0).