Sun, 19 Nov 2023 20:42:51 -0600Type-O All Keys On-Board

mr's Preposter.us Blog

Got an hour or so of Type-O hacking in today and made good progress on hooking the keyboard up.  I also printed a new case bottom with a bit more room for the wires and connectors.

image0.jpeg

There were no surprises wiring the remaining keys.  I had wired two rows and two columns the other day so todays electrical work consisted primarily of carefully tracing wires from the back of the keyswitches to the colored leads and then connecting them to the correct GPIO pins.  Once this was done it was a matter of tweaking the software to scan the additional rows and columns, and expanding the keymap to include the additional characters.

I took this opportunity to do a little refactoring to reduce the redundancy of the scanning code and to make it a little more dynamic and less hard-coded.  After about 30 minutes this was working correctly and I was able to enter something resembling a sentence or two:

image1.jpeg

There’s work to do on the control characters (backspace being the most obvious) and of course there’s no provisions for modifier keys yet, but overall I'm pretty happy having come this far in only a couple hours.

I could spend more time refining the keyboard (supporting uppercase, etc.) but I think the right step to take next is to refactor the code to use a more async approach and modularize the reading of the keyboard separately from displaying output, etc.  This will make it easier to add the other output mechanisms (storage, UID/USB, etc.) and let me work on each component more independently from the rest.

I also need to circle-back and work on the LCD more but I’m leaving that for a bit because it’s going to be a bit more involved than I originally planned.