Update Stepper.md
This commit is contained in:
parent
0f0bc641c8
commit
935104570c
|
|
@ -109,6 +109,12 @@ The **StepperControl** class provides the following methods to operate and contr
|
||||||
* it is possible, though not recommended, to change the step type *mode* while the motor is turning
|
* it is possible, though not recommended, to change the step type *mode* while the motor is turning
|
||||||
* see [Stepper Motor Modes](StepperModes.md) for a brief primer on how stepper motors are typically driven
|
* see [Stepper Motor Modes](StepperModes.md) for a brief primer on how stepper motors are typically driven
|
||||||
|
|
||||||
|
### CPU and Task Priority
|
||||||
|
|
||||||
|
All **StepperControl** constructors support an *optional* final parameter consisting of a *brace-enclosed* pair of numbers (not shown above). The first number in the braces specifies the *priority* of the background task used to control the stepper motor. The second number in the braces specifies the CPU (0 or 1) that **StepperControl** will use to run the background control task (this number is ignored for single-processor chips). The default (and recommended) value of this optional final parameter is {1,0}. Example:
|
||||||
|
|
||||||
|
* `new Stepper_TB6612(23,32,22,14,{0,1})` instantiates control of a stepper motor driven by a TB6612 chip, where ESP32 pins 23, 32, 22, and 14 are connected to the AIN1, AIN2, BIN1, and BIN2 pins on the TB6612, respectively; the priority of the background task is set to 0; and the task will be run on cpu 1 (applicable only for a dual-processor chip)
|
||||||
|
|
||||||
## Example Sketches
|
## Example Sketches
|
||||||
|
|
||||||
Below is a simple sketch demonstrating the above methods:
|
Below is a simple sketch demonstrating the above methods:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue