Runtime-only infrared chat for M5Stack CardputerZero.
- Send and receive messages with a compact custom 38 kHz raw IR protocol
- Keep up to 64 messages in memory for the current session only
- Accept messages up to 23 printable ASCII bytes
- Discover receiver and transmitter nodes by LIRC capability instead of device number
- Use a loopback mock backend for SDL desktop development
IR requires line of sight. This protocol is specific to IR Chat and is not an infrared remote-control protocol.
Fetch lvgl, spdlog, and smooth_ui_toolkit into dependencies/:
./bootstrap.shDevice builds use the Linux kernel LIRC character-device API directly and do
not require a userspace LIRC library. The receiver must support
LIRC_CAN_REC_MODE2, and the transmitter must support LIRC_CAN_SEND_PULSE.
SDL desktop build:
cmake -S . -B build/sdl -DIR_CHAT_USE_SDL=ON
cmake --build build/sdl -j8
IR_CHAT_SDL_ZOOM=2 ./dist/M5CardputerZero-IR-ChatCardputerZero cross-build from x86 Linux:
cmake -S . -B build/cp0 \
-DIR_CHAT_USE_SDL=OFF \
-DCMAKE_TOOLCHAIN_FILE=cmake/aarch64-linux-gnu.cmake
cmake --build build/cp0 -j8The output binary is dist/M5CardputerZero-IR-Chat.
Z/Cor Left/Right: switch between Messages and IR InfoF/Xor Up/Down: scroll messages- Enter or a printable key: open the message editor
- Enter: send; Esc: cancel, go back, or exit
- Backspace/Delete and Left/Right: edit the draft
Ror Enter on IR Info: retry initialization after an error
By default, the device build scans rc-core/LIRC nodes and selects RX and TX by capability. These strict overrides are available when automatic discovery is not appropriate:
IR_CHAT_LIRC_RX_DEVICE: receiver/dev/lirc*pathIR_CHAT_LIRC_TX_DEVICE: transmitter/dev/lirc*pathIR_CHAT_LIRC_RX_RC: receiver/sys/class/rc/rc*pathIR_CHAT_LIRC_TX_RC: transmitter/sys/class/rc/rc*path
An override fails initialization when its node is missing or does not advertise the required capability.
Build the CardputerZero arm64 APPLaunch package natively or with the GNU
AArch64 cross-toolchain:
./packaging/deb/package_deb.shThe generated package is written to dist/:
dist/m5cardputerzero-ir-chat_<version>_m5stack1_arm64.deb