stepper
This commit is contained in:
15
640.md
15
640.md
@@ -226,6 +226,21 @@ stepper1.setMotorSpeed(200)
|
|||||||
|
|
||||||
##### oneStep( *direction*, *style* )
|
##### oneStep( *direction*, *style* )
|
||||||
|
|
||||||
|
This command will move the stepper motor one step in your chosen direction -
|
||||||
|
|
||||||
|
- **dw_Controller.FORWARD** - set the stepper motor to move forward
|
||||||
|
- **dw_Controller.REVERSE** - set the stepper motor to move backwards
|
||||||
|
|
||||||
|
There are two stepping styles available -
|
||||||
|
|
||||||
|
- **dw_Controller.SINGLE** - this is the simplest method of stepping which activates a single coil at a time to move and hold the motor. This method uses the least amount of power.
|
||||||
|
- **dw_Controller.DOUBLE** - this is a slightly more complex method of stepping which uses to coils to move and hold the motor. This method uses twice as much power as the single step, but is more powerful.
|
||||||
|
|
||||||
|
``` python
|
||||||
|
stepper1.oneStep(dw_Controller.FORWARD, dw_Controller.SINGLE)
|
||||||
|
stepper1.oneStep(dw_Controller.REVERSE, dw_Controller.DOUBLE)
|
||||||
|
```
|
||||||
|
|
||||||
##### step( *steps*, *direction*, *style* )
|
##### step( *steps*, *direction*, *style* )
|
||||||
|
|
||||||
## C++
|
## C++
|
||||||
|
|||||||
Reference in New Issue
Block a user