Class ServoStepperPosition - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | This class controls a position drive. It controls a stepper motor using AccelStepper library. Sketch Made EASY includes an auto map from input to actuator. The class map the range of the assigned input (via relation) to an angle. |
Constructor |
ServoStepperPosition(int Pin1, int Pin2, int Pin3, int Pin4, int RotationSpeed, int MinAngle, int MaxAngle, int Resolution, int GearRatio, EInitializeMode InitializeMode = spNone, int HomeSwitchPin = 0, ESwitchResistoreMode HomeSwitchResistoreMode = smPullDownInternal, EMotorInterfaceType MotorInterfaceType = miFull4Wire) Parameter Pin1: Digital pin connected with motor shieldPin2: Digital pin connected with motor shieldPin3: Digital pin connected with motor shieldPin4: Digital pin connected with motor shieldRotationSpeed: Speed of the motor [rotations per minute].MinAngle: Minimum angle of the servoMaxAngle: Maximum angle of the servoResolution: Steps per revolution of the stepper motor (without gear)GearRatio: Gear box ratioInitializeMode: With a limit switch the stepper is able to start from a defined position. Optionally with value spNone. Multiple modes are possible:HomeSwitchPin: Digital pin with limit switch to detect 0-position. Optionally with the value 0SwitchResistoreMode: Optional with default smPullDownInternal. Details read Switch-Resistore-Mode. Possible values are:EMotorInterfaceType MotorInterfaceType: Read AccelStepper documentation to get more informations. Optionally with value miFull4Wire. Possible values are: |
Range | MinAngle…MaxAngle |
Samples | ServoStepperPosition* stepper = new ServoStepperPosition(8, 10, 9, 11, 5, 0, 360, 32, 64, spNone, 0, spBackward, miFull4Wire); |
Examples | Look test "55-ServoStepperPosition" |