Update README.md

Fix documentation around `Button` class's `repeat_time` behaviour.
pull/235/head
Richard Morrison 2022-01-04 22:09:38 +00:00 zatwierdzone przez GitHub
rodzic 19c23f0e78
commit aea0756fb8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -181,7 +181,7 @@ button_a = Button(plasma2040.BUTTON_A)
button_b = Button(plasma2040.BUTTON_B)
```
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 `hold_time / 3` milliseconds. This is useful for rapidly increasing/decreasing values such as hue:
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 such as hue:
```python
state = button_a.read()