Class MotorStepperRotateI2C - GSTCH/SketchMadeEASY GitHub Wiki

Actuator MotorStepperRotateI2C

Topic Specification
Description This class controls a stepper motor using Adafruit Motor Shield Version 2. This is able to control up to 2 stepper motors. It’s connected via I2C Bus. Up to 32 are stackable.
Constructor MotorStepperRotateI2C(int StepperNr, int Resolution, int GearRatio, int MaxCylcesPerSecond, EStepStyle StepStyle = ssSingle, int BusAdddress = 0x60)
Parameter
StepperNr: stepper motor 1 or 2 of the shield
Resolution: Steps per revolution of the stepper motor (without gear)
GearRatio: Gear box ratio
MaxCylcesPerSecond: Max frequency of the stepper motor [PPS]
StepStyle: Type of stepper motor signal. Optionally with the value ssSingle. Possible values are:
  • ssSingle (=1)
  • ssDouble (=2)
  • ssInterleave (=3)
  • ssMicrostep (=4)
    BusAdddress: I2C Address of the shield. Optionally with the value 0x60. If several shields are stacked, the address must be changed (by soldering). If several shields are stacked, the address must be changed (by soldering).
  • Range 0...255
    Samples MotorStepperRotateI2C* motor = new MotorStepperRotateI2C(2, 20, 71.1, 1000, ssSingle);
    Examples 13-Stepper motor with variable speed
    ⚠️ **GitHub.com Fallback** ⚠️