Minimal charging indicator for M5Stack CardPuter ADV (2025).
Turns off the display and shows battery level via the built-in RGB LED.
- Display completely off (saves power, prevents burn-in)
- LED color indicates battery level:
- Red = 0-25%
- Orange = 25-50%
- Yellow = 50-75%
- Green = 75-100%
- Updates every 10 seconds
This app is designed to work alongside M5Launcher.
Typical workflow:
- Your CardPuter runs M5Launcher as the main firmware
- You have
cardputer_charge_mode.ino.binon your SD card - When you want to charge:
- Plug in USB-C power cable
- Turn on CardPuter
- Open M5Launcher and run the charge mode app
- LED shows battery level, screen stays off
- When LED turns green (75%+), you're charged
- Restart to return to M5Launcher
With the display off, the device draws less power - charging is faster and there's no risk of screen burn-in from a static image.
For most users - no compiling needed!
- Download
cardputer_charge_mode.ino.binfrom Releases - Copy the
.binfile to your SD card - Insert SD card into CardPuter
- Open M5Launcher and run the bin file
That's it! The display will turn off and the LED will show your battery level.
For developers who want to modify or compile the code themselves.
- arduino-cli
- ESP32 board support:
arduino-cli core install esp32:esp32
# Clone
git clone https://github.com/screenfluent/cardputer_charge_mode.git
cd cardputer_charge_mode
# Compile
arduino-cli compile --fqbn esp32:esp32:m5stack_cardputer .
# Flash (replace /dev/ttyACM0 with your port)
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:m5stack_cardputer .arduino-cli compile --fqbn esp32:esp32:m5stack_cardputer --output-dir ./build .
# Output: build/cardputer_charge_mode.ino.binPower sharing: The CardPuter's LED and LCD backlight share a power rail. The backlight PWM must maintain a minimum duty cycle (~30%) for the LED to function. The display is put to sleep via ST7789 SLPIN command, so the screen appears off despite the backlight being partially on. If the SPI bus is already claimed (e.g., by M5Launcher), the LCD may stay visible but the LED indicator still works.
Battery reading: Uses GPIO10 (ADC1_CH9) with 8-sample averaging and ±3% hysteresis to prevent LED flickering near zone boundaries.
- Splash screen showing battery percentage at startup
- Button press to temporarily show battery level on LCD
- Green LED at 80% (healthy charge), blinking green at 100% (full)
This project was inspired by this Reddit post requesting a charging mode with LED status indicator.
MIT