Full hardware swap from Panlee SC01 Plus (480×320 IPS) to Waveshare 2.16" square AMOLED (480×480, CO5300 + CST9220 + AXP2101 + QMI8658). Library stack moves to Arduino_GFX, SensorLib, XPowersLib on the pioarduino platform 55.03.38-1 (Arduino Core 3.x). UI: - 4 screens (splash, usage, controller, bluetooth) with 3-button physical navigation: GPIO 0 = prev, AXP PKEY = cycle, GPIO 18 = next. - IMU-driven 90° auto-rotation. CO5300 can't rotate via MADCTL, so flush callback does CPU strip-rotation in PARTIAL render mode. Rotation transitions use AMOLED brightness flash (instant black → redraw → ramp). - Battery indicator (Lucide icons) in upper-right, RGB565A8 alpha so it blends over the splash animations. - USB plugged/unplugged auto-switches between Usage and Controller screens (suppressed while on splash). - Fonts and icons re-scaled ~1.9× for the higher-DPI panel; 20px margins to clear rounded corners. Splash: - 13 × 20×20 pixel-art creature animations sourced from claudepix.vercel.app via tools/scrape_claudepix.js (scraper handles both PRESET creature-engine and standalone FRAMES+PAL formats). tools/convert_to_c.js emits firmware/src/splash_animations.h. Attribution preserved in README and the generated header. Tooling: - tools/png_to_lvgl.js converts alpha PNGs to LVGL RGB565A8 (planar layout, with --tint to colorize Lucide black-on-transparent sources). - tools/scrape_claudepix.js, tools/convert_to_c.js for the splash pipeline. Docs: - New worktree CLAUDE.md with hardware pin map, file inventory, build commands, and the 8 critical gotchas (CO5300 rotation, OPI PSRAM, pioarduino requirement, LVGL 9 font patching, centralized touch read, even-aligned flush regions, touch swap/mirror values, RGB565A8 layout). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49 lines
1.3 KiB
INI
49 lines
1.3 KiB
INI
[env:waveshare_amoled_216]
|
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
|
|
board = esp32-s3-devkitc-1
|
|
framework = arduino
|
|
board_build.arduino.memory_type = qio_opi
|
|
upload_speed = 921600
|
|
monitor_speed = 115200
|
|
|
|
build_flags =
|
|
-DARDUINO_USB_CDC_ON_BOOT=1
|
|
-DBOARD_HAS_PSRAM
|
|
; AXP2101 PMU
|
|
-DXPOWERS_CHIP_AXP2101
|
|
; NimBLE config — peripheral-only, single connection
|
|
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
|
|
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
|
|
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
|
|
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
|
|
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
|
|
; LVGL config via build flags
|
|
-DLV_CONF_SKIP
|
|
-DLV_COLOR_DEPTH=16
|
|
-DLV_USE_LOG=0
|
|
-DLV_FONT_MONTSERRAT_12=1
|
|
-DLV_FONT_MONTSERRAT_14=1
|
|
-DLV_FONT_MONTSERRAT_16=1
|
|
-DLV_FONT_MONTSERRAT_20=1
|
|
-DLV_FONT_MONTSERRAT_24=1
|
|
-DLV_FONT_MONTSERRAT_28=1
|
|
-DLV_USE_BAR=1
|
|
-DLV_USE_LABEL=1
|
|
-DLV_USE_ARC=1
|
|
-DLV_USE_BTN=1
|
|
-DLV_USE_LINE=1
|
|
-DLV_USE_OBJ=1
|
|
-DLV_USE_IMG=1
|
|
-DLV_USE_IMAGE=1
|
|
-DLV_USE_ANIMIMG=0
|
|
-DLV_TICK_CUSTOM=1
|
|
-DLV_USE_SNAPSHOT=1
|
|
|
|
lib_deps =
|
|
moononournation/GFX Library for Arduino@^1.5.6
|
|
lewisxhe/SensorLib@^0.2.6
|
|
lewisxhe/XPowersLib@^0.2.7
|
|
lvgl/lvgl@^9.2.0
|
|
bblanchon/ArduinoJson@^7.0.0
|
|
h2zero/NimBLE-Arduino@^2.1.1
|