This commit is contained in:
shrkey
2016-09-25 23:56:35 +01:00
parent ce283a7b40
commit b94ff97e14

22
640.md
View File

@@ -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++