2022-04-24 21:33:35 +02:00
|
|
|
# AS5013 (aka 'EasyPoint')
|
2022-03-20 22:02:23 +01:00
|
|
|
|
|
|
|
Module handles the AM5013 Two-dimensional magnetic position sensor with digital coordinates output
|
|
|
|
|
2022-03-20 22:36:50 +01:00
|
|
|
Product page: https://www.mouser.dk/ProductDetail/ams/AS5013-IQFT?qs=abmNkq9no6D3ApA%252BrWSMNQ%3D%3D
|
2022-03-20 22:02:23 +01:00
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
Declare I2C bus and add this module in your main class.
|
|
|
|
|
|
|
|
```python
|
|
|
|
from kmk.modules.easypoint import Easypoint
|
2022-06-05 22:04:59 +02:00
|
|
|
import busio
|
2022-03-20 22:02:23 +01:00
|
|
|
|
|
|
|
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)
|
|
|
|
```
|