Ultimate Remote on M5Stack Cardputer
I had zero experience with infrared communication when I started. So the first thing I did was dive deep into how IR protocols actually work, timings, pulses, carrier frequencies, encodings. Only once I understood the fundamentals did I start thinking about implementation.
I wanted to pack an entire infrared database, thousands of .ir files spread across hundreds of folders into a single handheld device. The real challenge wasn’t just copying files to an SD card; it was parsing that file structure into a lightning‑fast C data model so the firmware never feels like it’s loading.
But the goal wasn’t just speed, it was also about making sure that the full database could be included directly in the firmware, giving users instant access to thousands of remotes without even needing an SD card.
This is the infrared database parsed into the Ultimate Remote firmware: https://github.com/probonopd/irdb/tree/master/codes
I managed to generate two .h files that contain the entire database:
- One for the command definitions
- The other for the raw IR signal data as a large C structure: a list of manufacturers, each containing their own list of remotes, which in turn hold a list of IR commands.
RemoteCommands.h
contains 30,321 commands, and RemoteData.h
includes 141,598 lines of IR data.
To support such a wide variety of remotes and commands, I needed a way to encode IR signals accurately for each protocol. I ended up adapting a piece of C++ code originally written in 2004 by John Fine. His work included logic for defining and generating IR signals from raw data into Pronto Hex strings. Here's a simple example of a Pronto Hex string used in the system
0000 006D 0022 0002 0156 00AB 0015 0015 0015 0015 0015 0015 0015 0015 0015 003F 0015 0015 0015 0015 0015 0015 0015 0015 0015 003F 0015 003F 0015 0015 0015 003F 0015 003F 0015 003F 0015 003F 0015 003F 0015 003F 0015 003F 0015 0015 0015 0015 0015 0015 0015 05F9 0156 0055 0015 0E47
This format defines a full IR signal, including carrier frequency, timing units, and the sequence of on/off pulses. By decoding and generating such strings programmatically, the firmware supports precise, protocol‑accurate transmission for a huge range of devices.
User Interface DesignThe user interface was designed from the ground up to feel fast and intuitive. With thousands of remotes to browse, fluid navigation was a must. I made sure that users can get from the main menu to the correct command with as few actions as possible, offering useful features like favorites, scanner, and key shortcuts. It’s simple enough for casual users, yet responsive and powerful enough for quick remote-switching in technical environments.
Why the Cardputer is a Perfect FitWhat makes the Cardputer shine in this project is not just the built-in IR LED, it’s also the integrated keyboard. Being able to quickly search for a brand by typing a few letters makes browsing a massive remote database surprisingly smooth. No need to scroll endlessly. Combined with the bright display, it creates a responsive and enjoyable user experience for something as potentially tedious as remote hunting.
- 🗂️ Extensive Database: Contains 3 498 remote profiles from 636 manufacturers right out of the box.
- 📡 Protocol Support: Understands 60+ IR protocols, from NEC and RC5 to obscure Kaseikyo flavors.
- 🔢 Massive Command Set: More than 30 000 individual commands ready to transmit.
- 💾 SD Card Support: Browse extra remotes stored on an SD card for unlimited expansion.
- 🔍 Scan & Find: Automatic scan mode cycles through remotes until your device responds, then lets you save the match.
- ⭐ Favorites: Pin up to 40 remotes for lightning‑fast access (plus 40 defaults already included).
- 📁 File Compatibility (.ir): Reads .ir files from the Flipper‑IRDB, so you can reuse the Flipper community’s huge library.
- 🧭 Folder Navigation & Search: Jump through folders, type to search, and load remotes instantly.
For more technical details, tips, and installation instructions, you can always refer to the GitHub repository. It includes additional guidance for working with .ir
files and expanding the database.
You’ll also find many other open-source firmwares I’ve developed for the M5Stack Cardputer. You can also find them ready to flash on the M5Burner software.
Comments