Merge pull request #1098 from dt215git/typo_picomotorshim

Update: motor README.md  typo
pull/937/merge
Hel Gibbons 2025-08-22 12:13:55 +01:00 zatwierdzone przez GitHub
commit 18d417b329
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -92,12 +92,12 @@ Button(button, invert=True, repeat_time=200, hold_time=1000)
To set up the user button, first import the `Button` class from the `pimoroni` module and the pin constant for the button from `motor`:
```python
from pimoroni import Button
from motor import picomotorshim
from motor import pico_motor_shim
```
Then create an instance of `Button` for the user button:
```python
button_a = Button(picomotorshim.BUTTON_A)
button_a = Button(pico_motor_shim.BUTTON_A)
```
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()
### Pin Constants
The `motor` module contains a `picomotorshim` sub module with constants for the motor and button pins.
The `motor` module contains a `pico_motor_shim` sub module with constants for the motor and button pins.
#### Motor Pins
@ -136,7 +136,7 @@ The `motor` module contains a `picomotorshim` sub module with constants for the
### Other Constants
The `picomotorshim` sub module also contains a constant for the number of motors on Pico Motor Shim:
The `pico_motor_shim` sub module also contains a constant for the number of motors on Pico Motor Shim:
* `NUM_MOTORS` = `2`