H4 - custom keyboard - bug in TCA8418 library and solution #234
Replies: 2 comments
-
@ilmarietto123 thanks for sharing this workaround! |
Beta Was this translation helpful? Give feedback.
-
a little help on the buttons from the firmware. `//code keypad/* C0 C1 C2 C3 C4 C5 C6R0 1 2 3 4 5 6 7R1 11 12 13 14 15 16 17 R2 21 22 23 24 25 26 27R3 31 32 33 34 35 36 37R4 41 42 43 44 45 46 47R5 51 52 53 54 55 56 57R6 61 62 63 64 65 66 67*/ define B_ON 17 //START |
Beta Was this translation helpful? Give feedback.
-
If someone like me want to make a custom keyboard with different layout for nanoELS H4, I hope this can be helpfull.
I found out there is a known bug in the Adafruit_TCA8418 library version 1.0.2.
If you try to use the 9th and 10th columns of the chip (named in datasheet "C8" and "C9"), you get a double/wrong replay.
You can find the issue here:
https://github.com/adafruit/Adafruit_TCA8418/issues/4
Following the Adafruit forum link in the issue, there is a working solution, modifing the library file:
"C:\Users<your user profile>\Documents\Arduino\Libraries\Adafruit_TCA8418\Adafruit_TCA8418.cpp"
from line 72 to 75.
Change lines from this:
to this:
Remember to modify also H4.ino accordingly to the size of your matrix keyboard at line 1472:
Example: my keyboard is 6 rows and 10 columns:
Then you can change the #define value of your buttons in the code from line 112 to 157 with the values indicated in TCA8418 datasheet table 1.
Thanks @kachurovskiy for your great project!
Beta Was this translation helpful? Give feedback.
All reactions