#Membrane Keyboard Conversion Help

1 messages · Page 1 of 1 (latest)

craggy matrix
#

I am working on retrofitting small membrane keyboard into a project I'm working on using the Pillbug board and a custom PCB FPC cable adapter. There are 23 pins, 14 are columns and 9 are rows. There are no diodes. Do I need to declare a diode direction? Which pins do I flag with "GPIO_PULL_DOWN"? So far I have not been able to confirm any input being registered. The keymap may also need work

    col-gpios = 
                <&gpio0 12 GPIO_ACTIVE_HIGH>,
                <&gpio0 19 GPIO_ACTIVE_HIGH>,
                <&gpio1 1 GPIO_ACTIVE_HIGH>,
                <&gpio0 29 GPIO_ACTIVE_HIGH>,
                <&gpio1 13 GPIO_ACTIVE_HIGH>,
                <&gpio0 6 GPIO_ACTIVE_HIGH>,
                <&gpio0 8 GPIO_ACTIVE_HIGH>,
                <&gpio1 0 GPIO_ACTIVE_HIGH>,
                <&gpio1 10 GPIO_ACTIVE_HIGH>,
                <&gpio1 2 GPIO_ACTIVE_HIGH>,
                <&gpio1 4 GPIO_ACTIVE_HIGH>,
                <&gpio0 13 GPIO_ACTIVE_HIGH>,
                <&gpio0 15 GPIO_ACTIVE_HIGH>,
                <&gpio0 17 GPIO_ACTIVE_HIGH>;

    row-gpios = 
                <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio0 25 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
                <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
novel snow
#

I believe either direction should be fine in that case, as long as your GPIO flags are consistent with it

#

With your current GPIO flags, col2row makes sense

#

In practice, diode-direction determines which pins are outputting signals and which pins are reading them. So it is good to define that even if you don't have diodes

craggy matrix
novel snow
#

Any diagram showing the rows?

craggy matrix
#

if I can begin with getting just a single pin set working, that'd be progress

#

So I'm thinking I can just declare GPIO flags for a single row and single column and just try that first

#

for example white in the column, red in the row

#

Although there's no way for me to force USB output without it being a keybind though.. maybe if I use the &bt BT_CLR, it'll put it into pairing mode at least?

novel snow
#

Why are you not testing with a usb cable?

craggy matrix
#

I am, but don't I need to switch it to USB output first for it to work via usb?

novel snow
#

No, it is the default

craggy matrix
#

I see, alright

craggy matrix
#

hmm still nothin

#

weird

novel snow
#

It is hard to say anything without seeing anything, really

craggy matrix
novel snow
craggy matrix
novel snow
#

Do you see the USB keyboard in the device manager etc.?

#

Once you fix the space, it should also advertise over BT

craggy matrix
novel snow
#

Interesting, do you get a key press if you short those two pins on the controller?

craggy matrix
#

trying that now

#

yes that works...

#

dang

#

but no keyboard

novel snow
#

I guess you gotta trace from pins to pads, make sure there is connectivity

#

Then make sure the pads make contact when key is pressed

craggy matrix
novel snow
#

Ah, that would do it

#

Hope you find a right one, I assume there must exist ones with contacts on both sides

craggy matrix
#

I decided to sanity check myself with my teensy keyboard controller and it works fine when inserted the opposite way I expected