add None to account for no encoder button

I had to dig through the code to find out what to do... adding it to the docs...
This commit is contained in:
Jay Wiggins 2022-04-05 09:49:41 -07:00 committed by Kyle Brown
parent f1d229c7ff
commit cca5b91be2

View File

@ -24,7 +24,7 @@ encoder_handler = EncoderHandler()
keyboard.modules = [layers, modtap, encoder_handler] keyboard.modules = [layers, modtap, encoder_handler]
``` ```
2. Define the pins for each encoder (pin_a, pin_b, pin_button, True for an inversed encoder) 2. Define the pins for each encoder (pin_a, pin_b, pin_button [or `None` if the encoder's button is handled differently or not at all], True for an inversed encoder)
```python ```python
#GPIO Encoder #GPIO Encoder
encoder_handler.pins = ((board.GP17, board.GP15, board.GP14, False), (encoder 2 definition), etc. ) encoder_handler.pins = ((board.GP17, board.GP15, board.GP14, False), (encoder 2 definition), etc. )