#besides the normal KMK these are the
1 messages ยท Page 1 of 1 (latest)
let's do a thread
here is what I've come up with
this scanner takes a tca instance, the list of pins, and an offset (to add to the key numbers for the second half)
if you use the int pin, it could be made better by checking the int pin I think, not sure
and this is how I think the keyboard file should look like
taking a list of scanners as self.matrix
if it works, you'll likely have to check what the key numbers it assigns to each key are, and adjust the OFFSET_RIGHT
Actually, I'll try it right now
One sec
Got an error
Traceback (most recent call last):
File "main.py", line 28, in <module>
File "kmk/kmk_keyboard.py", line 489, in go
File "kmk/kmk_keyboard.py", line 505, in _init
File "kmk/kmk_keyboard.py", line 393, in _init_matrix
File "/lib/tca8418_scanner.py", line 14, in key_count
AttributeError: 'TCAMatrixScanner' object has no attribute 'keypad'
ah, I left that, well I don't know how we know the number of keys ๐ค
we could just use the maximum number of keys ?
60
no errors
now i'll try to press a key
nothing, but this is something
here are the updated files with full keysets
I think I just need to play around with some Print statements to see what it's trying to do
if you get it to work, it would be nice to contribute it somewhere, having KMK on the Split Ortho Keyboard from the guide would probably be interesting to JP (the author of the guide) and the files might be contributed to KMK too
Oh I completely agree. I'll work out the bugs and get it back to you.
It'll be great to have an easy starter adafruit keyboard that can basically do everything QMK can do
and I'll go to bed ๐
Oh, don't count on it getting fixed tonight. I'm roped into watching Your Honor and then I need to sleep for work
Thankfully I work from home tomorrow, so I'll have some time
well see you tomorrow then ๐
I did some minor testing. Only the right half works since TCAMatrixScanner is called twice in a row, I think. Also, the key_count seems to be the starting value for what the right half puts out. If I set it so 30, it outputs the 31st element of the key array set in main.py.
I don't think running two separate scanners a the same time will be the solution. Instead, maybe passing tcas which is (tca_left, tca_right) I dunno. I'm going to sleep on it
that's 2 separate instances of TCAMatrixScanner, one for each half, they should be called in turn by KMK. Here is the doc on that:
https://github.com/KMKfw/kmk_firmware/blob/master/docs/en/scanners.md#multiple-scanners
you can add print(self.offset) at the start of scan_for_changes and print(self.offset, event, keynum, pressed) before return Event(...) to see if it's being called, the offset being different you will be able to identify each scanner separately, and figure out why one doesn't work.
I did some test by mocking the TCA driver and I get what I expect.
Also as you note, the "offset" is actually set by KMK to the keycount, so you can remove it from kb.py and from the scanner init.
Your scanner code works. My left split wasn't working because of some weird pin problem with my hardware
I'm currently running this heap without a plate for my switches
I just need to take use the offset so each instance knows which half it is and do math on the keycodes each sends so they're sending the right keys
modulos and offsets, the breakfast of champions
๐