blahlicus / animus-family

keyboard firmware family for arduino compatible atmega u series microcontrollers
Apache License 2.0
76 stars 21 forks source link

Help with custom keyboard needed #14

Open Cka3 opened 7 years ago

Cka3 commented 7 years ago

Hello and thanks for your efforts. I'm trying to use your firmware with my custom keyboard (using Pro Micro) Here is my wiring

   |2  |3  |4  |5  |6  |7  |
|16|   |   |   |   |   |   |
[15|   |   |   |   |   |   |
[14|   |   |   |   |   |   |
[10|   |   |   |   |   |   |
[9 |   |   |   |   |   |   |

I'm using this settings in Animus Firmware Builder: settings

Then I flash it with Arduino 1.8.0 - all goes fine

After that I'm opening Arbites and Terminus 2 Device image Applying it(it says done) and assuming that defined keys should work, but it does not - can't get any input using my keyboard, none of keys sending any input actually.

Am I missing something here?

P.s. This is not my first hand-wired keyboard.

blahlicus commented 7 years ago

Hey, could you upload your built version of the animus code from animus builder so that I could take a look and see if everything is alright? I recently updated some of the core codes so something might be broken.

Cka3 commented 7 years ago

Sure, here you go makeys1.zip

and here is my wiring, maybe my diodes direction is differs from yours? Thin red wires is my columns and colored wires is my rows wires

Cka3 commented 7 years ago

@blahlicus Any progress? I don't know if this will help, but I tried to use another firmware(QMK) and it is working without any problem on my keyboard. You can find project I've used here keyt01.zip. I've build it using http://qmk.sized.io. Still hope you can help me, because your firmware looks awesome)

blahlicus commented 7 years ago

Hey, I looked at your firmware build and there was nothing wrong and didn't see that you've edited your previous comment including some images. I've also rechecked your first post and noticed that you are using the Terminus 2 device option under Arbites, the Terminus 2 does not use a matrix grid (the actual pin matrix does not match the physical layout), could you try to use the existing firmware and apply your layout again under the Diverge-2-3 option instead and see if it works?

If it does not, then it means the rows and columns should be switched, simply rebuild your firmware with the horizontal pins and vertical pins switched and upload a layout via Arbites again.

Do let me know how it goes.

Cka3 commented 7 years ago

@blahlicus Hello again, I did couple more tests and now I confused even more... When I build firmware using this settings :

#define builder_vpins 16, 15, 14, 10, 9
#define builder_hpins 2, 3, 4, 5, 6, 7

then it will not send any input at all

But when I use this:

#define builder_vpins 2, 3, 4, 5, 6, 7
#define builder_hpins 16, 15, 14, 10, 9

all buttons will working, but layout is messed up, Here is layout I've tried image And here(in red) is what my keyboard is actually sending (my keyboard is 5x6 matrix): image

Any suggestion how to fix it?

Cka3 commented 7 years ago

Ok, I got it! Had to figure out your arb2kt file structure, here is my file for left part of my keyboard

image

keyt01.zip

Do you have any kind of builder for those files?

Now I need to figure out how to connect two parts together via i2c, do you have wiring manual by any chance? Is it something like this ?)

Thanks,

blahlicus commented 7 years ago

Hey, great job getting it to work, about getting a split keyboard working, simply build another firmware for your other half and add the mod I2C to your master side (the side with the USB plugged in) and the mod I2CSlave to your slave side.

About hooking up the two devices, make sure to connect pins 2 and 3 together on the two pro micros, so you will have to rewire your existing device since you are using pins 2 and 3 as part of the matrix, see diagram below for what I mean:

image

In order to make a split keyboard with the pro micros via I2C, the pins 2 and 3 must be reserved, so use the other pins to create your keyboard matrix.

Animus is physical layout agnostic so the two sides do not have to be symmetrical, just create two separate firmwares, one with the I2C mod included and the other with the I2CSlave mod included and they would work with each other as long as pins 2 and 3 of the two devices are connected to each other.

Note that any firmware with the I2CSlave mod included will not output anything via HID over the USB port, which would make debugging in your case quite confusing, this is expected behaviour to prevent double pressing if the user decides to plug in both sides via USB and have an interconnecting cable.

I advice that you create two separate firmware which works on the two sides of your device individually without any mods included, then upload the desired layout to each side of your device via Arbites, then rebuild each side of your firmware including the I2C and I2CSlave mods for each side.

This is probably quite confusing because whilst I did plan for Animus to be used by others, I did not plan for other people to use Arbites, I could help you build the necessary .arb2kt files and firmware if you could show me the matrix pins used by both sides of your device.

Cka3 commented 7 years ago

@blahlicus It's alive! Thanks!

File for Arbites would be great!

Here is my settings for the left side image And here is the right side image

Cka3 commented 7 years ago

Here I go ) Arbites File for my keyboard makey

keyt01.zip

blahlicus commented 7 years ago

Wow, great job! I was really busy for the past few days so this was on the backburner, must have been a PITA to handwrite the XML for it.

I see that you have an analog stick on the right side of your board, do you want to get it working? I could have a jab at it if you send me the datasheet or part number for that part.

Cka3 commented 7 years ago

I'm deferentially want it to work ) It is PSP 2000 joystick. I don't have datasheet for it, but it is usual analog stick. Here is pinout, I didn't checked it yet, but it is already connected to the A1 A2 pins on my right side . I will check which values it sends later today. 444-03

Cka3 commented 7 years ago

@blahlicus Here is what I found, it's the one I'm using in my keyboard https://www.youtube.com/watch?v=dK_rxQUTakc

blahlicus commented 7 years ago

Ah, the PSP joystick, it is a fairly typical joystick and implementing it with the arduino joystick library should be a piece of cake, I'll get it working in a day or two.

Cka3 commented 7 years ago

@blahlicus Any updates?)