Emulating A Bluetooth Keyboard With The ESP32

Most people associate the ESP family of microcontrollers with WiFi, which makes sense as they’ve become the solution of choice for getting your project online quickly and easily. But while the WiFi capability might be the star of the show, the ESP32 also comes equipped with Bluetooth; we just don’t see people using it nearly as often. If you’re looking to get started using Bluetooth on the ESP32, then this simple wireless macro keypad from [Brian Lough] would be a great way to get started.

From a hardware standpoint, this project is incredibly straightforward. All you need to do is connect a membrane keypad up to the GPIO pins on the ESP32. Adding in a battery is a nice touch, and you probably would want to put it into a enclosure of some sort, but as a proof of concept it doesn’t get much easier than this. In this case [Brian] is using the TinyPICO board, but your personal ESP32 variant of choice will work just as well.

The rest of the project is all software, which [Brian] walks us through in the video after the break. There’s a preexisting library for Bluetooth Human Interface Device (HID) emulation on the ESP32, but it needs to be manually installed in the Arduino IDE. From there, he demonstrates how you can build up a functioning keyboard, including tricks such as sending multiple virtual keys at once.

In the past we’ve seen the ESP32 used to create a Bluetooth game controller, but the ability to emulate a keyboard obviously offers quite a bit more flexibility. With a practical demonstration of how easy as it is to turn this low-cost microcontroller into a wireless input device, hopefully we’ll start seeing more projects that utilize the capability.

Continue reading “Emulating A Bluetooth Keyboard With The ESP32”

Sort The Rainbow With An Algorithm Machine

When you’re trying to learn how an algorithm works, it’s not always easy to visualize what’s going on. Well, except for maybe binary sort, thanks to the phone book. Professor [thatguyer] is a computer science teacher who wanted a way to help his students visualize the process of algorithms and at the same time, get a grasp on their resource cost.

The Algorithm Machine can demonstrate 8 different search and sort algorithms using two 100-count strips of RGB LEDs — one to represent an array of integers, and one to create indicators pointing to the integers under scrutiny.

This functional beauty is totally interactive, too. Once the user chooses the values and the algorithm and starts the process, they can speed it up or slow it down with the rotary encoder, or pause to discuss and start again with that slick triangular play button. We particularly like the control button wiring harness [thatguyer] created to keep everything neat and hot-swappable.

This iteration uses 3D printed face plates to give the LEDs shape, but in an early version, [thatguyer] cut and sanded a ton of circles out of brass tubing, and folded as many triangles cut from disposable baking pans. The world could use more teachers as committed as [thatguyer]. This really seems like a handy teaching aid for these concepts, and we wish we’d had one in class to play around with. Here’s your algorithm for watching the demo: click break, press play, enjoy.

If you’re still confused, there are other ways to understand algorithms through visualization. Failing all that, just watch these Hungarian folk dancers work out various algo-rhythms.

Continue reading “Sort The Rainbow With An Algorithm Machine”

Old Rotary Phone Gets Called Into Action

The more glass we punch with our fingertips, the more we miss fun physical interfaces like the rotary phone. Sure, they took forever to dial, and you did not want to be one of those kids stuck with one during the transition to DTMF, especially if you were trying to be the 9th caller to a radio station, but the solidly electromechanical experience of it all was just cool, okay? The sound and the heft made them seem so adult.

[Tal O] gets it. He’s all but finished bringing this old girl into the 21st century without giving anything away on her surface. Inside are some things you’d expect, like a SIM800 GSM module for the telephony part, and an ESP32 to count the pulses from the dialer and communicate between it and the GSM module. But it also has a few things we haven’t seen before. The entire journey is outlined in a five-part video series, and we’ve got part one dialed in for you after the break.

Although [Tal] got the ringer working to prove it could be done, he didn’t want to have a separate 12V circuit just to run the bells. Also, the bells and their electromagnets take up a lot of space, so he compromised with an mp3 of a rotary ringer. [Tal] also wanted a way to have dialed-number feedback without cutting up the phone to add a screen, so he found a text-to-speech library and made the phone speak each number aloud as soon as it’s dialed. It uses the same internal speaker as the ringer, but we think it would be neat if the feedback came through the handset speaker.

If [Tal] is looking for another modern convenience to add to this phone, how about speed dial?

Continue reading “Old Rotary Phone Gets Called Into Action”

Poking Around The Wide World Of Bluetooth

Bluetooth is a technology with a very interesting history. When it first came around in the late 1990s, it promised to replace the mess of wires that was tucked behind every desk of the day. Unfortunately, the capabilities of early Bluetooth didn’t live up to the hype, and it never quite took off. It wasn’t until the rise of the smartphone more than a decade later that Bluetooth, now several versions more advanced, really started to make sense.

As [Larry Bank] explains in a recent blog post, that means there’s a whole lot to learn if you want to really understand Bluetooth hacking. For example, the Bluetooth versions that were used in the 1990s and 2000s are actually a completely different protocol from that which most modern devices are using. But the original protocol, now referred to as “Classic”, is still supported and in use.

That means to really get your head wrapped around working with Bluetooth, you need to learn about the different versions and all the tools and tricks associated with them. To that end, [Larry] does a great job of breaking down the primary versions of Bluetooth and the sort of tools you might find yourself using. That includes microcontrollers such as the ESP32 or Arduino Nano 33 BLE.

But the post isn’t just theory. [Larry] also goes over a few real-world projects of his that utilize Bluetooth, such as getting a portable printer working with his Arduino, or figuring out how to use those tiny mobile phone game controllers for his own purposes. Even if you don’t have these same devices, there’s a good chance that the methods used and lessons learned will apply to whatever Bluetooth gadgets you’ve got your eye on.

Readers may recall [Larry] from our previous coverage of his exploits, such as his efforts to increase the frame rate of the SSD1306 OLED display or his wireless bootloader for the SMART Response XE. Whenever we see his name pop up in the Tip Line, we know a fascinating hardware deep dive isn’t far behind.

ESP32-Cam Does Time Lapse

Just a few years ago, had someone asked you how much a digital camera with WiFi would cost, you probably wouldn’t have said $6. But that’s about how much [Bitluni] paid for an ESP32-CAM. He wanted to try making the little camera do time lapse, and it turns out that’s pretty easy to do.

Of course, the devil is in the details. The camera starts out needing configuration on the USB interface and that enables the set up of Arduino integration and WiFi configuration. Because it stores each frame of the image on an SD card, the board can’t take rapid-fire pictures. [Bitluni] reports a 3-second delay was about the shortest he could manage, but for most purposes, he was using at least ten seconds.

The program has a live preview window to help you set up the shot, but before your recordings start that should be turned off so as not to overload the little processor and the I/O buses. The result is a bunch of JPG images that you can easily convert to a video on a PC if you wish.

This might be a good way to fit a camera on a 3D printer, especially if the time lapse effect was desired. Otherwise, you might sync to a layer change. Now all [bitluni] needs is an orbital rig.

Continue reading “ESP32-Cam Does Time Lapse”

ESP32 Serial Interface Modernizes Old Equipment

There’s still plenty of useful hardware out there that uses an RS-232 interface, like the Behringer Ultradrive loudspeaker systems that [Lasse Lukkari] works with from time to time. Rather than ditch perfectly good gear because modern computers (to say nothing of phones or tablets) don’t have physical serial ports, he decided to come up with a WiFi adapter for these old devices that he calls SerialChiller.

Inside the SerialChiller is an ESP32, a MAX3232 line driver, a LM1117 linear regulator, and a few passives. The professionally manufactured PCB is housed inside of an enclosure that [Lasse] has repurposed from a cheap DB15 breakout adapter. The USB cable is used to power the board and for programming, though it can also be used to turn the SerialChiller into a USB-to-serial cable as well.

The hardware for this project is pretty straightforward, but what we really like is the direction he’s taken with the software. Rather than using the SerialChiller as a simple serial to WiFi bridge, [Lasse] is actually implementing a complete web-based interface directly on the microcontroller. In the video after the break he demonstrates his firmware for controlling the aforementioned Behringer Ultradrive, but that’s just one possible application for the project. Firmware could be spun up for all sorts of classic devices, breathing new life into hardware that might otherwise be in danger of heading to the landfill.

Of course, using the ESP family of chips as serial adapters is hardly anything new. In fact, that’s what they were designed for. But developing modern user interfaces for old hardware thanks to the power of the ESP32 has some fascinating potential.

Continue reading “ESP32 Serial Interface Modernizes Old Equipment”

A Replica From WarGames, But Not The One You Think

Remember the WOPR from WarGames? The fictional supercomputer that went toe-to-toe with Matthew Broderick and his acoustic coupler was like a love letter to the blinkenlight mainframes of yesteryear, and every hacker of a certain age has secretly yearned for their own scaled down model of it. Well…that’s not what this project is.

The [Unexpected Maker] is as much a WarGames fan as any of us, but he was more interested in recreating the red alphanumeric displays that ticked along as the WOPR was trying to brute force missile launch codes. These displays, complete with their thoroughly 1980s “computer” sound effects, were used to ratchet up the tension by showing how close the supercomputer was to kicking off World War III.

The display as it appeared in the film.

Of course, most us don’t have a missile silo to install his recreated display in. So when it’s not running through one of the randomized launch code decoding sequences, the display doubles as an NTP synchronized clock. With the retro fourteen segment LEDs glowing behind the smoked acrylic front panel, we think the clock itself is pretty slick even without the movie references.

Beyond the aforementioned LEDs, [Unexpected Maker] is using a ESP32 development board of his own design called the TinyPICO. An associated audio “Shield” with an integrated buzzer provides the appropriate bleeps and bloops as the display goes through the motions. Everything is held inside of an understated 3D printed enclosure that would look great on the wall or a desk.

Once you’ve got your launch code busting LED clock going in the corner, and your illuimated DEFCON display mounted on the wall, you’ll be well on the way to completing the WarGames playset we’ve been dreaming of since 1983. The only way to lose is to not play the game! (Or something like that…)

Continue reading “A Replica From WarGames, But Not The One You Think”