Skip to content

Commit 18d417b

Browse files
authored
Merge pull request #1098 from dt215git/typo_picomotorshim
Update: motor README.md typo
2 parents 898348d + 65fad85 commit 18d417b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

micropython/modules/motor/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ Button(button, invert=True, repeat_time=200, hold_time=1000)
9292
To set up the user button, first import the `Button` class from the `pimoroni` module and the pin constant for the button from `motor`:
9393
```python
9494
from pimoroni import Button
95-
from motor import picomotorshim
95+
from motor import pico_motor_shim
9696
```
9797

9898
Then create an instance of `Button` for the user button:
9999
```python
100-
button_a = Button(picomotorshim.BUTTON_A)
100+
button_a = Button(pico_motor_shim.BUTTON_A)
101101
```
102102

103103
To get the button state, call `.read()`. If the button is held down, then this will return `True` at the interval specified by `repeat_time` until `hold_time` is reached, at which point it will return `True` every `repeat_time / 3` milliseconds. This is useful for rapidly increasing/decreasing values:
@@ -114,7 +114,7 @@ state = button_a.raw()
114114

115115
### Pin Constants
116116

117-
The `motor` module contains a `picomotorshim` sub module with constants for the motor and button pins.
117+
The `motor` module contains a `pico_motor_shim` sub module with constants for the motor and button pins.
118118

119119

120120
#### Motor Pins
@@ -136,7 +136,7 @@ The `motor` module contains a `picomotorshim` sub module with constants for the
136136

137137
### Other Constants
138138

139-
The `picomotorshim` sub module also contains a constant for the number of motors on Pico Motor Shim:
139+
The `pico_motor_shim` sub module also contains a constant for the number of motors on Pico Motor Shim:
140140

141141
* `NUM_MOTORS` = `2`
142142

0 commit comments

Comments
 (0)