2021-09-15 14:14:12 +02:00
|
|
|
# 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))
|
|
|
|
```
|
2021-09-21 09:09:56 +02:00
|
|
|
|
|
|
|
Firmware for this sensor has to be obtained separately and placed in kmk\modules\adns9800_firmware.py
|
|
|
|
```python
|
|
|
|
firmware = (
|
|
|
|
b'\x03'
|
|
|
|
b'\xa6'
|
|
|
|
...
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
2021-09-15 14:14:12 +02:00
|
|
|
## Constructor parameters
|
|
|
|
ADNS9800(cs=*cs_pin*, sclk=*clock_pin*, miso=*miso_pin*, mosi=*mosi_pin*, invert_x=*False*, invert_y=*False*)
|