Port kb2040 boards and add to quickpin
This commit is contained in:
parent
9842035834
commit
60e8f35eca
@ -2,12 +2,24 @@
|
||||
|
||||
![ffkb](https://fingerpunch.xyz/product/faux-fox-keyboard)
|
||||
|
||||
A 36 or 42 key keyboard with support for per key LEDs, 2 rotary encoders (EC11 or evqwgd001), and a feature in the center (EC11, OLED (128x64), or pimoroni trackball). KMK support is available for the BYO MCU option only.
|
||||
|
||||
Use `kb2040/kb.py` when using a KB2040 MCU.
|
||||
A 36 or 42 key keyboard with support for per key LEDs, 2 rotary encoders (EC11
|
||||
or evqwgd001), and a feature in the center (EC11, OLED (128x64), or pimoroni
|
||||
trackball). KMK support is available for the BYO MCU option only.
|
||||
|
||||
Use `nice_nano/kb.py` when using a Nice!Nano v2 MCU.
|
||||
|
||||
> Note: The Nice!Nano doesn't have a lot of ROM, so there are a couple of extra steps. See guidance [over here](../../docs/Officially_Supported_Microcontrollers.md#nicenano).
|
||||
> Note: The Nice!Nano doesn't have a lot of ROM, so there are a couple of extra
|
||||
> steps. See guidance [over
|
||||
> here](../../docs/Officially_Supported_Microcontrollers.md#nicenano).
|
||||
|
||||
Use `kb2040/kb.py` when using any other pro micro footprint MCU.
|
||||
|
||||
An example `main.py` file is included for each MCU.
|
||||
|
||||
## Microcontroller support
|
||||
|
||||
Update this line in `kb.py` to any supported microcontroller in `kmk/quickpin/pro_micro`
|
||||
|
||||
```python
|
||||
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
|
||||
```
|
||||
|
@ -1,35 +1,37 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.D9,
|
||||
board.D8,
|
||||
board.D7,
|
||||
board.D6,
|
||||
board.D5,
|
||||
board.D4,
|
||||
board.MOSI,
|
||||
board.MISO,
|
||||
pins[11],
|
||||
pins[10],
|
||||
pins[9],
|
||||
pins[8],
|
||||
pins[7],
|
||||
pins[6],
|
||||
pins[10],
|
||||
pins[12],
|
||||
)
|
||||
row_pins = (
|
||||
board.D1,
|
||||
board.A3,
|
||||
board.A2,
|
||||
board.A1,
|
||||
board.A0,
|
||||
board.SCK,
|
||||
pins[1],
|
||||
pins[19],
|
||||
pins[18],
|
||||
pins[17],
|
||||
pins[16],
|
||||
pins[15],
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.D0
|
||||
rgb_pixel_pin = pins[0]
|
||||
rgb_num_pixels = 42
|
||||
i2c = board.I2C
|
||||
|
||||
# flake8: noqa
|
||||
# flake8: noqa
|
||||
# fmt: off
|
||||
coord_mapping = [
|
||||
ic(0, 0), ic(0, 1), ic(0, 2), ic(0, 3), ic(0, 4), ic(0, 5), ic(0, 6), ic(0, 7), ic(4, 3), ic(3, 4), ic(4, 5), ic(3, 7),
|
||||
ic(1, 0), ic(1, 1), ic(1, 2), ic(1, 3), ic(1, 4), ic(1, 5), ic(4, 1), ic(1, 6), ic(1, 7), ic(3, 2), ic(4, 4), ic(3, 5), ic(4, 7),
|
@ -8,12 +8,10 @@ was designed with QMK in mind and KMK implementation is not officially supported
|
||||
|
||||
Keyboard works with controllers having Pro Micro layout. Existing configurations:
|
||||
|
||||
| PCB version | Board | Config file |
|
||||
|:-----------:|----------------------------------------------------------------------|---------------------------|
|
||||
| 1.* | [SparkFun Pro Micro RP2040](https://www.sparkfun.com/products/18288) | kyria_v1_rp2040 |
|
||||
| 1.* | [Adafruit KB2040](https://www.adafruit.com/product/5302) | kyria_v1_kb2040 |
|
||||
| 2.* | [SparkFun Pro Micro RP2040](https://www.sparkfun.com/products/18288) | _waiting for pinout docs_ |
|
||||
| 2.* | [Adafruit KB2040](https://www.adafruit.com/product/5302) | _waiting for pinout docs_ |
|
||||
| PCB version | Board | Config file |
|
||||
|:-----------:|-------------------------------------|---------------------------|
|
||||
| 1.* | Any quickpin pro micro based board. | kb_v1_ |
|
||||
| 2.* | Any quickpin pro micro based board. | _waiting for pinout docs_ |
|
||||
|
||||
## Compatibility issues
|
||||
|
||||
@ -51,3 +49,11 @@ Because of the above, besides of normal installation steps, you have to also:
|
||||
|
||||
- install Circuit Python in 7.2+ version
|
||||
- add `adafruit_pioasm.mpy` library to lib or root folder of a board
|
||||
|
||||
## Microcontroller support
|
||||
|
||||
Update this line in `kb.py` to any supported microcontroller in `kmk/quickpin/pro_micro`
|
||||
|
||||
```python
|
||||
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
|
||||
```
|
||||
|
@ -1,27 +1,26 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.A3,
|
||||
board.A2,
|
||||
board.A1,
|
||||
board.A0,
|
||||
board.SCK,
|
||||
board.MISO,
|
||||
board.MOSI,
|
||||
board.D10,
|
||||
pins[19],
|
||||
pins[18],
|
||||
pins[17],
|
||||
pins[16],
|
||||
pins[15],
|
||||
pins[14],
|
||||
pins[13],
|
||||
pins[12],
|
||||
)
|
||||
row_pins = (board.D8, board.D7, board.D6, board.D4)
|
||||
row_pins = (pins[10], pins[9], pins[8], pins[6])
|
||||
diode_orientation = DiodeOrientation.COL2ROW
|
||||
data_pin = board.D1
|
||||
rgb_pixel_pin = board.D0
|
||||
encoder_pin_0 = board.D9
|
||||
encoder_pin_1 = board.D5
|
||||
data_pin = pins[1]
|
||||
rgb_pixel_pin = pins[0]
|
||||
encoder_pin_0 = pins[11]
|
||||
encoder_pin_1 = pins[7]
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x, 8) for x in range(6))
|
@ -1,34 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.D29,
|
||||
board.D28,
|
||||
board.D27,
|
||||
board.D26,
|
||||
board.D22,
|
||||
board.D20,
|
||||
board.D23,
|
||||
board.D21,
|
||||
)
|
||||
row_pins = (board.D8, board.D7, board.D6, board.D4)
|
||||
diode_orientation = DiodeOrientation.COL2ROW
|
||||
data_pin = board.RX
|
||||
rgb_pixel_pin = board.D0
|
||||
encoder_pin_0 = board.D9
|
||||
encoder_pin_1 = board.D5
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x, 8) for x in range(6))
|
||||
coord_mapping.extend(ic(4, x, 8) for x in range(5, -1, -1))
|
||||
coord_mapping.extend(ic(1, x, 8) for x in range(6))
|
||||
coord_mapping.extend(ic(5, x, 8) for x in range(5, -1, -1))
|
||||
coord_mapping.extend(ic(2, x, 8) for x in range(8))
|
||||
coord_mapping.extend(ic(6, x, 8) for x in range(7, -1, -1))
|
||||
coord_mapping.extend(ic(3, x, 8) for x in range(3, 8))
|
||||
coord_mapping.extend(ic(7, x, 8) for x in range(7, 2, -1))
|
28
kmk/quickpin/pro_micro/kb2040.py
Normal file
28
kmk/quickpin/pro_micro/kb2040.py
Normal file
@ -0,0 +1,28 @@
|
||||
import board
|
||||
|
||||
pinout = [
|
||||
board.D0,
|
||||
board.D1,
|
||||
None, # GND
|
||||
None, # GND
|
||||
board.D2,
|
||||
board.D3,
|
||||
board.D4,
|
||||
board.D5,
|
||||
board.D6,
|
||||
board.D7,
|
||||
board.D8,
|
||||
board.D9,
|
||||
board.D10,
|
||||
board.MOSI,
|
||||
board.MISO,
|
||||
board.SCK,
|
||||
board.A0,
|
||||
board.A1,
|
||||
board.A2,
|
||||
board.A3,
|
||||
None, # 3.3v
|
||||
None, # RST
|
||||
None, # GND
|
||||
None, # RAW
|
||||
]
|
Loading…
Reference in New Issue
Block a user