Make Motors PWM devices with optional speed argument on methods

This commit is contained in:
Ben Nuttall
2015-10-07 17:09:28 +01:00
parent 65b5ba9ea6
commit ee36451bed
4 changed files with 83 additions and 63 deletions

View File

@@ -161,6 +161,6 @@ motor = Motor(forward=17, back=18)
| Method | Description | Arguments |
| ------ | ----------- | --------- |
| `forward()` | Drive the motor forwards. | `seconds` - The number of seconds to stay on for. If `None`, stay on. Default: `None` |
| `backward()` | Drive the motor backwards. | `seconds` - The number of seconds to stay on for. If `None`, stay on. Default: `None` |
| `forward()` | Drive the motor forwards. | `speed` - Speed at which to drive the motor, `0` to `1`. Default: `1` |
| `backward()` | Drive the motor backwards. | `speed` - Speed at which to drive the motor, `0` to `1`. Default: `1` |
| `stop()` | Stop the motor. | None |