Skip to content

Repository files navigation

M5PaperColor NameCard

A digital business card display system for the M5PaperColor color e-paper device. This project creates an elegant, low-power digital name card that displays your name, avatar image, and a QR code on a 400x600 color e-paper display. It is a port of M5PaperS3_NameCard to the M5PaperColor, rebuilt on ESP-IDF.

Demo

M5PaperColor NameCard Demo

The card is composed of a gold header band (name), a centered avatar, an on-device generated QR code, and a gold footer band (handle) — rendered in color and held on the e-paper without power.

Author: X (Twitter) - @crazybocan

Features

  • Static name card display on a color e-paper screen
  • Low power consumption ideal for conferences and networking events
  • Avatar image embedded in flash — no microSD card required
  • QR code generated on-device from a URL (always correct, no image to prepare)
  • Color layout that suits the 6-color (Spectra 6) panel
  • Professional digital alternative to traditional paper business cards
  • Battery-powered operation

Hardware Requirements

  • M5PaperColor development board (ESP32-S3, color e-paper)
  • USB-C cable for flashing
  • Development environment: ESP-IDF v5.4.x

Hardware Specifications

  • Display: 400 x 600, color e-paper (6 colors: black, white, red, green, blue, yellow)
  • SoC: ESP32-S3 with 8 MB Octal PSRAM, 16 MB flash
  • Power IC: M5PM1 — gates the e-paper power rail (EPD_EN); the panel will not refresh until it is enabled

Card Content

All card content lives in main/main.cpp — edit the CARD_* constants near the top:

static constexpr const char *CARD_NAME   = "kakimochi";
static constexpr const char *CARD_HANDLE = "@crazybocan";
static constexpr const char *CARD_URL    = "https://x.com/crazybocan";  // QR target

Avatar Image

  • File: main/assets/avatar.png (embedded into the firmware at build time)
  • Format: PNG (color is fine; the panel dithers to its 6-color palette)
  • Size: any aspect ratio; the source is scaled from a 232 px reference width
  • To customize, simply replace main/assets/avatar.png and rebuild — no code change needed.

QR Code

The QR code is generated on the device from CARD_URL at draw time, so there is no QR image to prepare or keep in sync.

Setup Instructions

1. Development Environment

  • Install ESP-IDF v5.4.x (see the official guide)
  • Activate the ESP-IDF environment in your shell. On this project's Windows setup a helper is provided: . .\export.ps1 (see CLAUDE.md for details).

2. Build and Flash

idf.py set-target esp32s3
idf.py build
idf.py -p <PORT> flash       # e.g. -p COM5 on Windows

Managed components (M5GFX, M5Unified, m5pm1) are fetched automatically on the first build from main/idf_component.yml / dependencies.lock.

Usage

  1. Customize the card content and avatar (see Card Content).
  2. Build and flash the firmware to the M5PaperColor.
  3. The name card is drawn automatically at boot and remains on the e-paper, consuming minimal power. A full color refresh takes ~15-20 seconds.

Code Structure

The application logic is contained in main/main.cpp:

  • board_init() — brings up the display and the M5PM1 power IC (enables the e-paper power rail and boost converter)
  • draw_name_card() — composes the header band, avatar (drawPng from the embedded asset), on-device QR code, and footer band onto a full-screen M5Canvas, then pushes it in a single e-paper refresh
  • Setup-once, display-forever pattern optimized for e-paper

Dependencies

  • M5Unified / M5GFX: M5Stack hardware and graphics libraries (pinned to the commits used by the official M5PaperColor demo for panel support)
  • m5stack/m5pm1: M5PM1 power-management IC driver
  • ESP-IDF v5.4.x: ESP32-S3 development framework

References

License

This project is licensed under the MIT License — see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages