A Modular Macro Keypad

The introduction of the ATmega32U4 microcontroller, with its integrated USB controller, made a lot of hardware tasks much simpler than they were before. One of the arenas it revolutionized was custom keyboards, making it much easier to build not only standard mechanical keyboards, but keyboards of all kinds of shapes and layouts and custom macro keyboards as well. This trend has continued on for the better part of the past decade with other microcontrollers beyond the 32U4 now available as well, but this modular macro keypad takes it to a new level by keeping that simplicity but also keeping costs down.

The suutari20, as it is called by its creator [Squalius] is able to achieve these aims by using 3.5 mm jacks commonly found in audio equipment. Each jack can support up to three keys, with the hub ultimately able to support 18 different keys. Those can include analog devices as well, such as volume knobs or jog controllers. The macro pad is powered by an RP2040 microcontroller from a Raspberry Pi Pico and uses QMK firmware, so those already familiar with custom keyboard programming will have no problem getting started.

From there, all that’s needed is a case, in this example a 3D printed one, and the commodity audio hardware to plug everything in to. It enables whatever functions can be thought of in a macro pad, and although the design focuses on simplicity and cost, this macro pad takes the concept to the extreme with modular keys that each have their own microcontroller built-in.

Continue reading “A Modular Macro Keypad” →

Writing An ESP32 Bluetooth Printer Driver In Two Acts

[Bas BotBerg] wanted to use a portable Bluetooth thermal printer to run off reports on sensor data collected by an ESP32-C3 microcontroller. But as is so often the case these days, the only official way to interface with the printer was through a proprietary smartphone application provided by the manufacturer. With no documentation on how the thing works, he set out to reverse engineer the printer’s communications protocol so he could control it from the MCU — but the route he took to get there was a bit different than what we usually see, and is an excellent case study for those who might have similar projects in mind.

The standard procedure for something like this, if it can be called that, is to use Android’s built-in debugging capability to log Bluetooth communications while running the manufacturer’s application. The resulting file can be fed into Wireshark, and with patience and some educated guesses, you can usually work out the various commands and values that get passed to the hardware.

But in this case, [Bas BotBerg] ignored the manufacturer’s software and instead used an application that can query a device and list its Bluetooth Low Energy services and characteristics. Specifically, he looks for services that are marked as writable, and starts pushing data into them to see how the printer responds. For this he uses Python with the Bleak library, as it allows him to rapidly iterate and adapt his code. After a bit of poking and experimentation, he finds the proper incantation to get the printer’s motor to kick on and advance the paper — a critical first milestone that tells him he’s on the right path.

Once [Bas BotBerg] mapped out what data needed to be sent to what endpoints to operate the printer in Python, it was a relatively straightforward process to send those same payloads using C++ code on the ESP32. For extra style points he also brought in the Adafruit GFX library so he could produce icons and more easily format the output of the printer.

It doesn’t look like [Bas BotBerg] has released the code in this case (perhaps if we all ask nicely), but we’ve seen similar efforts to bring open source drivers to these cheap Bluetooth printers for the good of the community.

If It’s Electronic Paper, Why Not Print To It?

E-ink is supposed to be the electronic version of dead-tree paper, but there’s one enormous difference: how you get your images and text onto it. For paper, you print on it. E-ink? Well, it depends on what it’s hooked up to. If it’s an ESP32C3-based Xteink X4 and X3, then you can just print to that, too, thanks to [Nishant Joshi]’s fork of the popular CrossPoint firmware.

The fork implements the Internet Printer Protocol, IPP, on the ESP32-C3. It makes loading documents a breeze: select the printer in your operating system, and press print. To the computer, the reader advertises itself as a printer that provides monochrome, single-sided output at 300 DPI on A5 paper, and accepts Apple raster and PWG raster formats. Of course these raster images are enormous compared to the paltry RAM available on the microcontroller, so pixels are received and written row-by-row — both to the screen directly, and to the SD card for later perusal. That makes a folder on the SD card the equivalent of a printer’s output tray.

This interface is amazing in its simplicity, and we’d love to see it in other E-ink devices. It reminds us somehow of AlphaSmart word processors — which are still relevant today in large part because their ‘file transfer’ mechanism is to pretend to be a USB keyboard and type the document onto your computer. As long as IPP is available, so too will you be able to get documents onto this e-reader.

There’s A Whole Computer Inside This Mouse

[Gadget Industry] bills it as “a PC inside a Mouse“, but that depends on your definition of a “PC”. This is a Personal Computer inside a mouse, yes, but there’s nothing IBM-compatible about the tiny ARM board he squeezes inside what’s normally a peripheral — it actually started life as a smartphone, which only takes this build up a notch compared to starting with a single-board computer like a Pi.

Specifically, he starts with a Galaxy S21 5G. Starting with a Samsung means he can leave the stock Android alone and just take advantage of Samsung’s DeX desktop mode, rather than layer a Linux environment on top or replace the operating system entirely with something like Postmarket OS, which are both viable options.

Continue reading “There’s A Whole Computer Inside This Mouse” →

A Split Keyboard Designed For Human Hands

A surprising number of things we use in everyday life retain most of their design cues from their 19th century ancestors. The bicycle retains the same basic design as it had in 1890, as does the sewing machine, the toilet, the car, and of course, the keyboard and the QWERTY layout from old typewriters. But we aren’t doomed to have our technology perpetually living in the past. [Paul] wanted a keyboard designed around human hands, rather than being designed around a machine, so he built this unique split keyboard.

The design of this specific keyboard went through around 50 iterations before he was comfortable with it. Other design goals here were for it to be portable, and the split nature of this certainly makes it more compact as does the use of low-profile switches. Each finger’s column is angled and spaced based on the needs of that finger, with the ring finger keys sitting higher and the index finger columns angled inward. Each thumb has access to three keys, one of which is the spacebar and the other two layer keys, which is what enables this design to get down to only 36 total keys.

When thinking about it for any length of time, the modern keyboard’s design holdovers from the 1800s are fairly wasteful compared to this split, ergonomic version. Especially when looking at the spacebar, which ties up both thumbs and only performs a single task, there’s a lot of opportunity for modern designs to be more efficient, more portable, and easier on one’s body. Feel free to take this to the extreme and use all three dimensions, as long as you aren’t particularly concerned with portability.

Running Zork On The Steam Controller

The Steam Controller is a device capable of many interesting feats. It’s intended to act simply as an input device, and yet, it can run games all on its own. As [Owen Feldman] has demonstrated, by having the Steam Controller play Zork.

[Owen] took quite an interesting route to get the there: he wrote a Rust program to emulate the Intel 8080 CPU and CP/M, as one does. This was ported to the Steam Controller, which emulates the CPU and memory on its own internal processor. I/O is streamed over USB, since the Steam Controller lacks a keyboard or screen. The CP/M disk lives in the controller, but the Zork disk data is streamed over USB as well.

If you’re wondering how [Owen] got all this running on the controller, he explains on his personal website. He used what appears to be an undocumented tool included with Steam that allows flashing firmware on the device. Helpfully, Valve also include the original firmware in the same folder, unsigned and only relying on a simple CRC checksum. [Owen] bricked his controller a couple times experimenting with this tool and loading his own firmware, but all came good in the end.

The Steam Controller is probably the oddest device to run CP/M for a while, but hey—it’s a neat party trick. Not much is going to top the auto-docking hack from a few months ago, though.

Continue reading “Running Zork On The Steam Controller” →

Your Laptop Keyboard, On Another Device

It’s likely many of us have been in the position of first set-up on a machine such as a Raspberry Pi, and had keyboard problems. Either no spare keyboard is to be found, or a cluttered desk has to find extra space for a full-size keyboard. [Þórarinn] and [Arni] have a handy solution: use the existing keyboard on your laptop.

His approach is both ingenious and simple, as it’s only the K part of a KVM. On the laptop end, it’s a serial terminal, without the receiving side. The serial port in question is an RP2040 board which implements a USB-to-serial port. This serial connection goes to another RP2040, which does the ingenious bit. It’s a serial-to-USB HID keyboard. All of this means that keystrokes on the laptop are sent down the serial connection, and appear on the Pi or whatever computer as a USB keyboard as though typed locally. The mildly annoying first set-up can be done, and then it can be run via SSH or whatever other remote access protocol as normal. The code is provided, so anyone with a couple of RP2040 boards can do it.

We like this hack, because we’ve had the annoyance of needing a keyboard to set up what would otherwise be a completely headless machine too many times. It’s one to store away at the back of your mind, for those rare improvisational need-an-extra-keyboard moments.

Thanks [Henk] for the tip.