ESP32 Hosts A USB Keyboard In This Typewriter

Did you know the ESP32 can be a USB host? Well it can, and [Volos] uses host mode to build this fun little word processor.

The venerable ESP32 has a well-known USB device mode. Anyone who has programmed one has used it. A bit less known is the microcontroller’s ability to host USB devices. These days, operating as a USB device is relatively simple. But acting as a host is a much more complex task. The ESP32 has a software host that works — but only for Human Interface Devices (HID).  Human interface devices generally are keyboards, mice, trackballs, and similar devices that handle data relatively slowly, forming the interface with us simple humans.

[Volos] uses the EspUsbHost Arduino library for this project. The library makes USB host mode simple to use. Another piece of the puzzle is the LCD board [Volos] picked. It has a dual-role USB Type-C port, meaning the hardware to switch roles is baked in. Other boards may require some modifications or special cables to make things work.

The software is the best part of this build. [Volos] implemented a simple word processor. It can save and load files from a microSD card and, of course, edit text — all controlled by a USB keyboard. He had to use a 4-bit palette to save memory. This gives the device a retro charm that reminds us of Don Lancaster’s TV Typewriter. The source for this and all of [Volos] projects can be found on GitHub. Now, all we need is a spell check that can fit in the memory constraints of the ESP32! We have to admit the chip has a lot of potential USB tricks.

Continue reading “ESP32 Hosts A USB Keyboard In This Typewriter”

Dynamic Buttons Are Weird Blobs You Can Press

Imagine a flat surface that has no buttons on it, until they raise up like bubbles of goo for you to touch them. The Future Interface Group at Carnegie-Mellon has apparently developed just that. They’re calling the technology DynaButtons, and they look kinda weird…and very awesome.

The buttons use electro-osmotic pump technology. Basically, electricity is used to move a fluid under a flexible surface to create a dimple-shaped button. The team was able to increase the flow-rate of these pumps by 300% over traditional designs, while also integrating sensing for interactivity. This allowed the creation of a dynamic button that pops up as needed. The button design is fast and responsive. It’s able to readily change its position in an analog manner, both raising up and deflating below the base surface on command.

We don’t often cover weird goopy-looking projects around here, but maybe we should.

Continue reading “Dynamic Buttons Are Weird Blobs You Can Press”

Keypad Interface Module Reverse Engineers Pinouts So You Don’t Have To

If you’ve scavenged some random keypads and want to reuse them in a project without the hassle of figuring out the pinouts, then [Cliff Biffle] has an interface module for you. The Keypad Go connects to the mystery keypad via an 8-pin 0.1 inch header, and talks to your own project using I2C and/or serial.

You could categorize the mechanism at work as machine learning of a sort, though it’s stretching definitions a bit, as there is no ChatGPT or GitHub Copilot wizardry going on here. But you must teach the module during an initial calibration sequence, assigning a 7-bit ASCII character to each key as you press it. Once trained, it responds to key presses by sending the pre-assigned character over the interface. Likewise, key releases send the same character but with the 8th bit set.

The heart of the board is either an STM32G030 or STM32C011/31, depending on parts availability we presume. I2C connectivity is over a four-pin STEMMA connector, and logic-level serial UART data is over a four-pin 0.1 inch pin header. [Cliff] plans to release the firmware and schematics as open source soon, after cleaning up the code a bit. The device is also for sale on Tindie, though it looks like they won’t be back in stock until later on in the month.

Longtime readers might recognize [Cliff] from his impressive m4vga project which we covered back in 2015, where he manages to generate 800×600 VGA signals at 60 Hz from an STM32F4-family microcontroller.

Continue reading “Keypad Interface Module Reverse Engineers Pinouts So You Don’t Have To”

Bridging A Gap Between LLMs And Programming With TypeChat

By now, large language models (LLMs) like OpenAI’s ChatGPT are old news. While not perfect, they can assist with all kinds of tasks like creating efficient Excel spreadsheets, writing cover letters, asking for music references, and putting together functional computer programs in a variety of languages. One thing these LLMs don’t do yet though is integrate well with existing app interfaces. However, that’s where the TypeChat library comes in, bridging the gap between LLMs and programming.

TypeChat is an experimental MIT-licensed library from Microsoft which sits in between a user and a LLM and formats responses from the AI that are type-safe so that they can easily be plugged back in to the original interface. It does this by generating JSON responses based on user input, making it easier to take the user input directly, run it through the LLM, and then use the output directly in another piece of code. It can be used for things like prototyping prompts, validating responses, and handling errors. It’s also not limited to a single LLM and can be fairly easily modified to work with many of the existing models.

The software is still in its infancy but does hope to make it somewhat easier to work between user inputs within existing pieces of software and LLMs which have quickly become all the rage in the computer science world. We expect to see plenty more tools like this become available as more people take up using these new tools, which have plenty of applications beyond just writing code.

Transform An Original Xbox Controller To A 360 Controller

If you’re looking for a controller for your computer or mobile device, you could certainly do worse than one of the latest iterations of the Xbox pad. They might not be perfect, but they’re fairly well-made, not particularly expensive, use standard USB and Bluetooth interfaces, and even have decent support in the open-source community. So if you’re gaming on Linux or working on any other kind of retro gaming rig it’ll likely be plug-and-play.

This wasn’t the case with the first generation Xbox controller, though, and although its proprietary connector was actually using USB, the controller scheme wasn’t as open. This is [Tom]’s effort of upcycling his original Xbox controller to work indistinguishably from a stock Xbox 360 controller.

For those asking why anyone would want to do this, [Tom] is actually one of the few who enjoyed the original bulky Xbox “Duke” controller that released with the console in 2001. It wasn’t a popular choice in the larger gaming community and a year later Microsoft released a smaller version, but we all have our quirks. A Teensy 4.1 is attached to the end of the controller cable and acts as an intermediary to intercept the proprietary signalling coming from this controller and convert it into something usable. Since the controller doesn’t even show up as a standard USB HID device it took a little more sniffing of the protocol to decipher what was going on at all, but eventually some help was found within this other driver that gave [Tom] the clues he needed to get it working.

There were some other headaches to this project as well, especially since USB debugging USB connections while using USB isn’t exactly a streamlined process, but after a couple of breakthroughs the Teensy pass-through interface began working and [Tom] can use his controller of choice across multiple platforms now. If you’re looking to upgrade in other ways take a look at this build which seeks to recalibrate, rather than replace, an older Xbox controller experiencing drift on its analog control sticks.

Continue reading “Transform An Original Xbox Controller To A 360 Controller”

A Dedicated GPU For Your Favorite SBC

The Raspberry Pi is famous for its low cost, versatile and open Linux environment, and plentiful I/O, making it a perfect device not only for its originally-intended educational purposes but for basically every hobbyist from gardeners to roboticists to amateur radio operators. Most builds tend to make use of the GPIO pins which allow easy connections to various peripherals and sensors, but the Pi also supports PCI devices which means that, in theory, it could use a GPU in much the same way that a modern computer would. After plenty of testing and development, [Jeff Geerling] brings us this custom graphics card interface for the Raspberry Pi.

The testing for all of these graphics cards has been done with a Pi Compute Module 4 and the end result is an interface device which looks much like a graphics card itself. It splits the PCI bus out onto a more familiar x16 slot connector and adds physical connections for power, USB, and Ethernet. When plugged into the carrier board, the Compute Module can be attached to any of a number of graphics cards, including the latest and highest-end of Nvidia and AMD offerings.

Perhaps unsurprisingly, though, the 4090 and 7900 cards don’t work with the Raspberry Pi. This is partially due to the 32-bit limitations of the Pi and other memory mapping issues, but even after attempting some workarounds Nvidia’s cards aren’t open-source enough to test properly (although the card is recognized by the Pi) and AMD’s drivers crash the system even after compiling a custom kernel. [Jeff] did find an Nvidia card that worked, although it requires using the USB interface and second-hand cards are selling for around $3000 USD. For a more economical choice there are some other graphics cards that he was eventually able to get working, albeit not with perfect performance, including some of the ones we’ve seen him test already.

Continue reading “A Dedicated GPU For Your Favorite SBC”

Beat Backing Box For Bassists

The soul of a rock band is its rhythm section, usually consisting of a drummer and bass player. If you don’t believe that, try listening to a band where these two can’t keep proper time. Bands can often get away with sloppy guitars and vocals (this is how punk became a genre), but without that foundation you’ll be hard pressed to score any gigs at all. Unfortunately drums are bulky and expensive, and good drummers hard to find, so if you’re an aspiring bassist looking to practice laying down a solid groove on your own check out this drum machine designed by [Duncan McIntyre].

The drum machine is designed to be as user-friendly as possible for someone who is actively playing another instrument, which means all tactile inputs and no touch screens. Several rows of buttons across the top select the drum sounds for the sequencer and each column corresponds to the various beats, allowing custom patterns to be selected and changed rapidly. There are several other controls for volume and tempo, and since it’s based on MIDI using the VS1053 chip and uses an STM32 microcontroller it’s easily configurable and can be quickly interfaced with other machines as well.

For anyone who wants to build their own, all of the circuit schematics and code are available on GitHub. If you have an aversion to digital equipment, though, take a look at this drum machine that produces its rhythms using circuits that are completely analog.

Continue reading “Beat Backing Box For Bassists”