Threeboard: Short on Keys, Long on Documentation

As peripherals go, few get hacked on more than keyboards. Layouts, shapes, sizes, materials, and even the question of what a keyboard is are all on the table for tinkering. In this vein, [TaylorConor] released their simplified keyboard called the threeboard on GitHub, having only three keys and replicating a full keyboard.

We’ve covered keyboards built with chords in mind, wrapped around coffee mugs, and keyboards with joysticks for added speed. So why cover this one? What makes it different? The execution is superb and is a great example to watch the next time you complete a project you want to show off. The keyboard consists of only three mechanical switches, two 8-bit binary displays (16 LEDs in total), three status LEDs and three LEDs indicating the current layer (four layers). The detailed user manual explains everything. There’s a reliable Atmega32U4 microcontroller and two EEPROM chips at its heart.

Where this project shows itself is in testing. It features unit testing, mock integration testing, and mock property testing. As all the code is in C++, the unit tests are relatively simple. Integration and ownership testing is done via a simulator. Rather than recompiling the code with new flags, it uses the simavr AVR simulator, which means it simulates the same binary file that is flashed to the microcontroller. This approach means that the design is tested and debugged via GDB. It’s an amazing technique that we’d like to see more of in hobby projects. Marketing parlance might call this a “digital twin”, but the idea is that you have a virtual version that’s easier to work on and has a tighter iteration loop while still being as close to the physical release.

[TaylorConor’s] The goal was to create a microcontroller project from scratch with easy-to-read code, fantastic documentation, and best practices. We think he succeeded. So feel free to run the simulator or jump straight into building a simulator. All hardware is licensed under CERN-OHL-P, and firmware is under GPLv3.

Sam D. Gomez