stepper
This commit is contained in:
22
640.md
22
640.md
@@ -105,7 +105,7 @@ The off command will switch off the motor and apply the brakes
|
||||
m1.off()
|
||||
```
|
||||
|
||||
##### setMotorSpeed()
|
||||
##### setMotorSpeed( *speed*)
|
||||
|
||||
We can also stop the motor by using the second command and passing a speed of 0
|
||||
|
||||
@@ -206,7 +206,27 @@ stepper1 = dw.getStepper(1)
|
||||
|
||||
#### Stepper motor control
|
||||
|
||||
There are four commands for stepper motors. The first one you'll recognise
|
||||
|
||||
##### off()
|
||||
|
||||
The off command will switch off the stepper motor
|
||||
|
||||
``` python
|
||||
stepper1.off()
|
||||
```
|
||||
|
||||
##### setMotorSpeed( *rpm* )
|
||||
|
||||
This command allows you to set the speed of your stepper motor. Pass the number of revolutions per minute that you want your stepper motor to run at.
|
||||
|
||||
``` python
|
||||
stepper1.setMotorSpeed(200)
|
||||
```
|
||||
|
||||
##### oneStep( *direction*, *style* )
|
||||
|
||||
##### step( *steps*, *direction*, *style* )
|
||||
|
||||
## C++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user