#besides the normal KMK these are the

1 messages ยท Page 1 of 1 (latest)

white shard
#

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

vital carbon
#

Excellent

#

I'll be able to try it in about forty minutes

white shard
#

if it works, you'll likely have to check what the key numbers it assigns to each key are, and adjust the OFFSET_RIGHT

vital carbon
#

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'

white shard
#

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 ?

vital carbon
#

60

#

no errors

#

now i'll try to press a key

#

nothing, but this is something

#

I think I just need to play around with some Print statements to see what it's trying to do

white shard
#

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

vital carbon
#

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

white shard
#

and I'll go to bed ๐Ÿ˜›

vital carbon
#

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

white shard
#

well see you tomorrow then ๐Ÿ˜‰

vital carbon
#

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

white shard
white shard
#

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.

vital carbon
#

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

white shard
#

๐ŸŽ‰

vital carbon
#

Guess what I'm typing this with?

#

What I had to do to get what the keyboard was outputting to be correct looks horrendous, but it works.