implements scanner with rotaryio
This commit is contained in:
@@ -99,6 +99,7 @@ class MyKeyboard(KMKKeyboard):
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
## Digitalio Scanners
|
||||
|
||||
### digitalio MatrixScanner
|
||||
@@ -120,6 +121,28 @@ class MyKeyboard(KMKKeyboard):
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
## Rotary Encoder Scanners
|
||||
|
||||
### RotaryioEncoder
|
||||
|
||||
Matrix events from a quadrature ("rotary") encoder?
|
||||
|
||||
```python
|
||||
from kmk.scanners.encoder import RotaryioEncoder
|
||||
|
||||
class MyKeyboard(KMKKeyboard):
|
||||
def __init__(self):
|
||||
# create and register the scanner
|
||||
self.matrix = RotaryioEncoder(
|
||||
pin_a=board.GP0,
|
||||
pin_b=board.GP1,
|
||||
# optional
|
||||
divisor=4,
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
## `Scanner` base class
|
||||
|
||||
If you require a different type of scanner, you can create your own by
|
||||
|
Reference in New Issue
Block a user