JanLunge / pog

A Kmk firmware flashing and configuration tool
https://pog.heaper.de/
MIT License
367 stars 23 forks source link

Cannot use coordmapper (invalid pin even though print(dir(board)) gives those pins) #48

Open Viterkim opened 6 hours ago

Viterkim commented 6 hours ago
 INVALID PIN FOUND D0
 INVALID PIN FOUND D1
 INVALID PIN FOUND D12
 INVALID PIN FOUND D13
 INVALID PIN FOUND D14
 INVALID PIN FOUND D15
 INVALID PIN FOUND D16
 INVALID PIN FOUND D4
 INVALID PIN FOUND D5
 INVALID PIN FOUND D6
 INVALID PIN FOUND D7
 INVALID PIN FOUND D8
 INVALID PIN FOUND D9

Tried with the new version 6 hours ago (and the static sha of KMK, downloader doesn't seem to work so manually did it).

 ['__class__', '__name__', 'A0', 'A1', 'A2', 'A3', 'D0', 'D1', 'D12', 'D13', 'D14', 'D15', 'D16', 'D2', 'D20', 'D21', 'D22', 'D23', 'D26', 'D27', 'D28', 'D29', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8', 'D9', 'I2C', 'MISO', 'MOSI', 'NEOPIXEL', 'POWER_LED', 'RX', 'SCK', 'SCL', 'SDA', 'SPI', 'TX', 'UART', 'VBUS_SENSE', '__dict__', 'board_id']

image

Using a splitkb lutris https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/boards/splitkb_liatris/pins.c

any idea on what i might possibly be doing wrong? Thank you!

JanLunge commented 6 hours ago

seems like you dont have a pinprefix set? usually it should check for board.D0 not just D0, that could be something to check. Do you have some more info on how the download did not work like which OS are you on?

Viterkim commented 5 hours ago

I'm on windows! Thanks for trying to help. I'm trying to test it out with the board prefix set, but it's quite difficult to get the "debug output" when pressing flash coordmap.

If i press the debug button, the terminal windows will usually be empty. And when connecting there's nothing. Is there a way i can have the output in a terminal next to it? (Seems that i very rarely do get it)

Or is there a smarter way to debug :D ?

JanLunge commented 5 hours ago

the debug tab in pog isnt that great yet, i do use a separate app like MuEditor with the repl in there as a separate window.

Viterkim commented 5 hours ago

Do you have an example of that? just downloaded MuEditor. image

Doesn't seem like anything shows up or do you write anything to get the debug info? (or could i maybe call the flash coordmap call from the terminal?

Viterkim commented 5 hours ago

After tabbing to the debug tab many times after pressing the flash button:

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
]0;🐍code.py | 9.2.1\starting keyboard  (01JE9T8G9W0EHHV75N1DKJJ9S3)
Traceback (most recent call last):
  File "code.py", line 3, in <module>
  File "pog.py", line 52, in <module>
  File "pog.py", line 40, in renderPin
TypeError: unsupported types for __add__: 'str', 'NoneType'
]0;🐍40@pog.py TypeError | 9.2.1\
Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.
JanLunge commented 5 hours ago

once you press flash coord map it only writes a flag to the config file to start differently (with the keymap printing the coordmap indexes) that means you need to press ctrl+c or ctrl+d to exit the interactive repl and let the keyboard code run. that error means something with your data likely the pin is wrong in this case its not a string not sure you you got there

Viterkim commented 5 hours ago

You're the best

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
]0;🐍code.py | 9.2.1\starting keyboard  (01JE9T8G9W0EHHV75N1DKJJ9S3)
split with 2 pins (UART)
Running coord_mapping assistant
Press each key to get its coord_mapping value
coord_mapping = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83]
Total keys: 84
adding key...
Layer created with 84 keys
Keymap initialized with 84 keys
265204 kmk.keyboard: Initialising CoordMapKeyboard
265207 kmk.hid: use 6KRO
265208 kmk.hid: use no pan
265209 kmk.keyboard: hid=USBHID(REPORT_BYTES=9)
265256 kmk.keyboard: matrix=['MatrixScanner']
265264 kmk.keyboard: modules=['Layers', 'Macros', 'Split']
265268 kmk.keyboard: extensions=['MediaKeys']
265302 kmk.keyboard: mem_info used:106272 free:63008

now i just have to make it work :D

image

not the best at this... but i'll try my best :) thank you! (and can you see if i did anything wrong?

JanLunge commented 5 hours ago

looks good though i can recommend doing the coordmap setup for a split keyboard for each half once with it set to normal instead of split just to see if the pins and everything works. there are some cases where the split board will only output on one side if set to split (as it expects the main half to send the commands to the pc)

Viterkim commented 5 hours ago

It's quite annoying trying to get debug output. Is there a way to get it in the REPL? EDIT: nvm got it out somehow