Class MotorStepperRotateI2C - GSTCH/SketchMadeEASY GitHub Wiki
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 shieldResolution: Steps per revolution of the stepper motor (without gear)GearRatio: Gear box ratioMaxCylcesPerSecond: Max frequency of the stepper motor [PPS]StepStyle: Type of stepper motor signal. Optionally with the value ssSingle. Possible values are: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 |