A Keyboard For Anything, Without A Keyboard

There are many solutions for remote control keyboards, be they Bluetooth, infrared, or whatever else. Often they leave much to be desired, and come with distinctly underwhelming physical buttons. [konkop] has a solution to these woes we’ve not seen before, turning an ESP32-S3 into a USB HID keyboard with a web interface for typing and some physical keyboard macro buttons. Instead of typing on the thing, you connect to it via WiFi using your phone, tablet, or computer, and type into a web browser. Your typing is then relayed to the USB HID interface.

The full hardware and software for the design is in the GitHub repository. The macro buttons use Cherry MX keys, and are mapped by default to the common control sequences that most of us would find useful. The software uses Visual Studio Code, and PlatformIO.

We like this project, because it solves something we’ve all encountered at one time or another, and it does so in a novel way. Yes, typing on a smartphone screen can be just as annoying as doing so with a fiddly rubber keyboard, but at least many of us already have our smartphones to hand. Previous plug-in keyboard dongles haven’t reached this ease of use.

IPhone Becomes A Bluetooth Keyboard And Mouse

Sometimes you need to use a computer and you don’t have a spare keyboard and mouse on hand. [KoStard] figured an iPhone could serve as a passable replacement interface device. To that end, he built an adapter to let the phone act as a wireless keyboard and mouse on just about any modern machine.

To achieve this, [KoStard] grabbed an ESP32-S3 development board, and programmed it to act as a USB HID device to any machine attached over USB. It then listens out for Bluetooth LE communications from an iPhone equipped with the companion app. The app provides an on-screen keyboard on the iPhone that covers everything including special keys, symbols, and punctuation. You can also take advantage of the iPhone’s quality capacitive touchscreen, which emulates a nicely-responsive  trackpad, with two-finger taps used for right clicking and two-finger drags for scroll. Latency is nice and low courtesy of the direct Bluetooth LE connection.

It’s a nifty build that is particularly useful in oddball situations where you might want a keyboard and mouse. For example, [KoStard] notes it’s a great way to control a Smart TV without having to do ugly slow “typing” on an infrared remote. We’ve seen his work before, too—previously building an adapter to provide Bluetooth capability to any old USB keyboard. Video after the break.

Continue reading “IPhone Becomes A Bluetooth Keyboard And Mouse”

ESP32 BTE Keyboard

Wired To Wireless: ESP32 Gives Your USB Keyboard Bluetooth

Few things rival the usability and speed of a full-sized keyboard for text input. For decades, though, keyboards were mostly wired, which can limit where you use your favorite one. To address this, [KoStard]’s latest project uses an ESP32 to bridge a USB keyboard to BLE devices.

The ESP32-S3 packs a ton of fantastic functionality into its small size and low price—including USB-OTG support, which is key here. Taking advantage of this, [KoStard] programmed an ESP32-S3 to host a keyboard over its USB port while connecting via BLE to devices like cellphones.

There are some slick tricks baked in, too: you can pair with up to three devices and switch between them using a key combo. Some of you might be wondering how you can just plug a microcontroller into a keyboard and have it work. The truth is, it doesn’t without extra hardware. Both the keyboard and ESP32-S3 need power. The simplest fix is a powered USB hub: it can be battery-powered for a truly mobile setup, or use a wired 5V supply so you never have to charge batteries.

We love seeing a simple, affordable microcontroller extend the usefulness of gear you already have. Let us know in the comments about other hacks you’ve used to connect keyboards to devices never designed for them.

Continue reading “Wired To Wireless: ESP32 Gives Your USB Keyboard Bluetooth”

A photo of the cats and the generated image

The Cutest Weather Forecast On E-Ink And ESP32

There’s a famous book that starts: “It is a truth universally acknowledged that a man in possession of a good e-ink display, must be in want of a weather station.” — or something like that, anyway. We’re not English majors. We are, however, major fans of this feline-based e-ink weather display by [Jesse Ward-Bond]. It’s got everything: e-ink, cats, and AI.

The generated image needs a little massaging to look nice on the Spectra6 e-ink display.

AI? Well, it might seem a bit gratuitous for a simple weather display, but [Jesse] wanted something a little more personalized and dynamic than just icons. With that in the design brief, he turned to Google’s Nano Banana API, feeding it the forecast and a description of his cats to automatically generate a cute scene to match the day’s weather.

That turned out to not be enough variety for the old monkey brain, so the superiority of silicon — specifically Gemini–was called upon to write unique daily prompts for Nano Banana using a random style from a list presumably generated by TinyLlama running on a C64. Okay, no, [Jesse] wrote the prompt for Gemini himself. It can’t be LLM’s all the way down, after all. Gemini is also picking the foreground, background, and activity the cats will be doing for maximum neophilia.

Aside from the parts that are obviously on Google servers, this is all integrated in [Jesse]’s Home Assistant server. That server stores the generated image until the ESP32 fetches it. He’s using a reTerminal board from SeedStudio that includes an ESP32-S3 and a Spectra6 colour e-ink display. That display leaves something to be desired in coloration, so on top of dithering the image to match the palette of the display, he’s also got a bit of color-correction in place to make it really pop.

If you’re interested in replicating this feline forecast, [Jesse] has shared the code on GitHub, but it comes with a warning: cuteness isn’t free. That is to say, the tokens for the API calls to generate these images aren’t free; [Jesse] estimates that when the sign-up bonus is used up, it should cost about fourteen cents a pop at current rates. Worth it? That’s a personal choice. Some might prefer saving their pennies and checking the forecast on something more physical, while others might prefer the retro touch only a CRT can provide. 

Xcc700: Self-Hosted C Compiler For The ESP32/Xtensa

With two cores at 240 MHz and about 8.5 MB of non-banked RAM if you’re using the right ESP32-S3 version, this MCU seems at least in terms of specifications to be quite the mini PC. Obviously this means that it should be capable of self-hosting its compiler, which is exactly what [Valentyn Danylchuk] did with the xcc700 C compiler project.

Targeting the Xtensa Lx7 ISA of the ESP32-S3, this is a minimal C compiler that outputs relocatable ELF binaries. These binaries can subsequently be run with for example the ESP-IDF-based elf_loader component. Obviously, this is best done on an ESP32 platform that has PSRAM, unless your binary fits within the few hundred kB that’s left after all the housekeeping and communication stacks are loaded.

The xcc700 compiler is currently very minimalistic, omitting more complex loop types as well as long and floating point types, for starters. There’s no optimization of the final code either, but considering that it’s 700 lines of code just for a PoC, there seems to be still plenty of room for improvement.

Virtual Pet Responds To WiFi

When the Tamagotchi first launched all those decades ago, it took the world by storm. It was just a bunch of simple animations on a monochrome LCD, but it had heart, and people responded to that. Modern technology is capable of so much more, so [CiferTech] set out to build a virtual pet that can sniff out WiFi networks.

The build employs an ESP32-S3, perhaps the world’s favorite microcontroller that has WiFi baked right in from the factory. It’s paired with a 240×240 TFT LCD that delivers bright, vivid colors to show the digital pet living inside. Addressable WS2812B LEDs and a simple sound engine provide further feedback on the pet’s status.

The pet has various behaviors coded in, like hunting, exploring, and resting, and moods such as “happy,” “curious,” and “bored.” For a bit of environmental reactivity, [CiferTech] also made the local WiFi environment play a role. Nearby networks can influence the “hunger, happiness, and health” of the pet.

Incidentally, if you’ve ever wondered what made the Tamagotchi tick, we’ve explored that before, too.

Continue reading “Virtual Pet Responds To WiFi”

A circular 3D-printed board is shown, with a roughly star-shaped pattern of white LEDs glowing through the surface. Yellow and green LEDs are also visible through the surface at a few points.

Adding Electronics To A Classic Game

Like many classic board games, Ludo offers its players numerous opportunities to inflict frustration on other players. Despite this, [Viktor Takacs] apparently enjoys it, which motivated him to build a thoroughly modernized, LED-based, WiFi-enabled game board for it (GitHub repository).

The new game board is built inside a stylish 3D-printed enclosure with a thin white front face, under which the 115 LEDs sit. Seven LEDs in the center represent a die, and the rest mark out the track around the board and each user’s home row. Up to six people can play on the board, and different colors of the LEDs along the track represent their tokens’ positions. To prevent light leaks, a black plastic barrier surrounds each LED. Each player has one button to control their pieces, with a combination of long and short presses serving to select one of the possible actions.

The electronics themselves are mounted on seven circuit boards, which were divided into sections to reduce their size and therefore their manufacturing cost. For component placement reasons, [Viktor] used a barrel connector instead of USB, but for more general compatibility also created an adapter from USB-C to a barrel plug. The board is controlled by an ESP32-S3, which hosts a server that can be used to set game rules, configure player colors, save and load games, and view statistics for the game (who rolled the most sixes, who sent other players home most often, etc.).

If you prefer your games a bit more complex, we’ve also seen electronics added to Settlers of Catan. On a rather larger scale, there is also this LED-based board game which invites humans onto the board itself. Continue reading “Adding Electronics To A Classic Game”