kmk_firmware/docs/adns9800.md
Ryan Rotter dfa73a8cca add backtick quotes for code snippets
* Added for keycodes, pin numbers, and code snippets. Mostly in tables.
* Enhance documentation readability
* Make automated spell checking easier - aspell automatically ignores these snippets
* fix invalid markdown table in mouse_keys.md
2022-04-25 16:53:22 +00:00

20 lines
539 B
Markdown

# ADNS9800
Add this module for controlling ADNS9800 optical sensor.
```python
from kmk.modules.adns9800 import ADNS9800
keyboard.modules.append(ADNS9800(cs=board.GP0, sclk=board.GP2, miso=board.GP4, mosi=board.GP3, invert_y=True))
```
Firmware for this sensor has to be obtained separately and placed in `kmk\modules\adns9800_firmware.py`
```python
firmware = (
b'\x03'
b'\xa6'
...
)
```
## Constructor parameters
ADNS9800(cs=*cs_pin*, sclk=*clock_pin*, miso=*miso_pin*, mosi=*mosi_pin*, invert_x=*False*, invert_y=*False*)