Class StepperLinearActuator

  • All Implemented Interfaces:
    crackers.kobots.parts.movement.Actuator , crackers.kobots.parts.movement.StepperActuator

    
    public class StepperLinearActuator
    extends LinearActuator implements StepperActuator
                        

    An actuator that translates percentages into steps on a stepper motor. Note that due to rounding issues between these two integer values, the positioning is not guaranteed to be exact.

    ONLY WORKS WITH SINGLE-STEP DRIVERS!

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      StepperLinearActuator(BasicStepperMotor theStepper, Integer maxSteps, Boolean reversed, BasicStepperController.StepStyle stepStyle)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Integer getCurrent()
      final BasicStepperMotor getTheStepper()
      final Integer getMaxSteps()
      final Boolean getReversed()
      final BasicStepperController.StepStyle getStepStyle()
      Boolean extendTo(Integer percentage) Extend or retract the actuator to the given percentage of the total range of motion.
      Unit release() Release the stepper: this is to prevent over-heating
      Unit reset() Allows for "re-calibration" of the stepper to the "0" position.
      • Methods inherited from class crackers.kobots.parts.movement.LinearActuator

        move
      • Methods inherited from class java.lang.Object

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

      • StepperLinearActuator

        StepperLinearActuator(BasicStepperMotor theStepper, Integer maxSteps, Boolean reversed, BasicStepperController.StepStyle stepStyle)