dilshod / 36-choc-key-ortholinear-split

36 (choc/kailhx) key ortholinear split keyboard
52 stars 7 forks source link

Pimoroni Trackball Support? #1

Open t0bybr opened 5 months ago

t0bybr commented 5 months ago

Hi, I really love this Design and I'm waiting at the moment for the mcus to arrive to build. Thank you by the way to make it open source. I was wondering if it would be possible to add a Pimoroni Trackball to this keyboard? It connects via I2C and is supported by ZMK so I think it should work but I'm not sure. Do you know if it would work? Thanks in advance Toby

dilshod commented 5 months ago

Hi, I think it should work. I never tried it because I read it has high power consumption, according to N76E003 datasheet it consumes at least 4 times more power than xiao ble both in idle mode.

t0bybr commented 5 months ago

Thanks for your response. I'm designing a case at the moment and there would be space for a bigger battery.

What do you think would be the best way to connect the Trackball?

dilshod commented 5 months ago

sda and scl pins are already used by keys, but you can use p0.02 and p0.03 pins, you will have to solder directly to the module pins: trackpoints sda to p0.02, scl to p0.03, gnd and 3v3 pins. As I understand int pin can be left unconnected.

Patch zmk from here: https://www.reddit.com/r/ErgoMechKeyboards/comments/pxbaw0/pimoroni_pim447_trackball_support_in_zmk_firmware/

And change i2c in your overlay file to use p0.02 and p0.03 pins. It's a theory, I'm not sure if it will work. If you try it, I'd love to hear how it goes.

Pinout

t0bybr commented 5 months ago

Thank you for the detailed explanation. Is there another free pin? Then I could connect INT in case it gets used sometime. And if I get it to work, I'll of course let you know.

dilshod commented 5 months ago

There are two NFC pins on the bottom of the module, you can use them. In order to use them add this line to your zmk config:

CONFIG_NFCT_PINS_AS_GPIOS=y

NFC pins are: p0.09 and p0.10

beibupinout3

suriaribeiro commented 5 months ago

Did you manage to get it to work? It would be greT if you could share your zmk config as I am trying to do the same thing

t0bybr commented 5 months ago

Sorry, didn't have the time to try it yet. Hope to get to it this weekend. I will post results.

suriaribeiro commented 5 months ago

Cool! Looking forward to how you get on. The pimoroni trackball would be a great companion to xiao ble based keyboards.

suriaribeiro commented 5 months ago

I gave an initial try but failed miserably https://github.com/suriaribeiro/zmk-config-acari/tree/pimoroni-branch

t0bybr commented 1 month ago

Sorry for the late reply but I didn't have time to build the keyboard until now. But now I built it and the keyboard itself is working fine, which is great because I'm not the best in regards to soldering.

But I also can't get the trackball working. If I use the zmk fork from https://github.com/cdc-mkb/zmk/commits/mouse-pim447 it fails building because it has no board definition of the xiao BLE. If I use regular zmk and try to merge the PIM447 files into it, I can get it to build but the trackball isn't working. My problem is that I never worked with zmk before and I'm too unfamiliar with it at the moment.