Implement easypoint
This commit is contained in:
committed by
Kyle Brown
parent
1863543428
commit
4f7f3dcc3c
25
docs/easypoint.md
Normal file
25
docs/easypoint.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# AS5013 (aka. 'EasyPoint')
|
||||
|
||||
Module handles the AM5013 Two-dimensional magnetic position sensor with digital coordinates output
|
||||
|
||||
Product page: https://ams.com/en/as5013
|
||||
|
||||
### Usage
|
||||
|
||||
Declare I2C bus and add this module in your main class.
|
||||
|
||||
```python
|
||||
from kmk.modules.easypoint import Easypoint
|
||||
import busio as io
|
||||
|
||||
i2c = busio.I2C(scl=board.GP1, sda=board.GP0)
|
||||
|
||||
easypoint = Easypoint(i2c, address=0x40)
|
||||
keyboard.modules.append(easypoint)
|
||||
```
|
||||
|
||||
Further configuring the AS5013 involved x/y-offset, and deadzone.
|
||||
|
||||
```python
|
||||
easypoint = Easypoint(i2c, address=0x40, y_offset=Y_OFFSET, x_offset=X_OFFSET, dead_x=DEAD_X, dead_y=DEAD_Y)
|
||||
```
|
@@ -29,3 +29,4 @@ These modules are for specific hardware and may require additional libraries to
|
||||
- [ADNS9800](adns9800.md): Controlling ADNS9800 optical sensor.
|
||||
- [Encoder](encoder.md): Handling rotary encoders.
|
||||
- [Pimoroni trackball](pimoroni_trackball.md): Handling a small I2C trackball made by Pimoroni.
|
||||
- [AS5013 aka. easypoint](easypoint.md): Handling a small I2C magnetic position sensor made by AMS.
|
||||
|
Reference in New Issue
Block a user