diff --git a/README.en.md b/README.en.md index 223b6fa..c90ffbf 100644 --- a/README.en.md +++ b/README.en.md @@ -4,7 +4,7 @@ Arduino firmware and a macOS companion for the Waveshare ESP32-S3-Touch-AMOLED-2.16. The device receives real Codex account usage and task status from the local computer over encrypted BLE. Codex credentials are never stored on the ESP32. -![Main screen design](docs/ui/main-ring-open-arc-corrected-480.png) +![Codex Usage Display hardware](docs/device-photo.jpg) > Current status: first usable hardware release. The firmware, BLE companion, > global hooks, tests, and PlatformIO build are working end to end. Only the @@ -42,7 +42,39 @@ With the three physical buttons along the top edge when viewed from the front: `focus_codex` activates the ChatGPT/Codex app on the Mac. `refresh` immediately reloads the data. `new_task` uses macOS Accessibility to send `⌘N`. -## Arduino IDE +## Recommended: PlatformIO + +PlatformIO is the primary development path for this project. It pins the major +dependency versions used by the Waveshare Arduino example: + +- Arduino-ESP32 3.3.5 +- LVGL 8.4.0 +- Arduino_GFX 1.6.4 +- SensorLib 0.3.3 +- XPowersLib 0.2.6 + +After installing PlatformIO: + +```bash +pio run +``` + +The firmware image is written to: + +```text +.pio/build/esp32-s3-touch-amoled-216/firmware.bin +``` + +With the board connected: + +```bash +pio run -t upload +pio device monitor +``` + +If the download port is not detected, hold BOOT while connecting USB-C and release it when the port appears. Uploading replaces the firmware currently installed on the device. + +## Arduino IDE (alternative) Open [esp32/esp32.ino](esp32/esp32.ino) directly. Do not select only the containing folder in the file picker. Arduino IDE will also compile the implementation under `src/`. @@ -183,37 +215,6 @@ The first use of `NEW TASK` also requires Terminal permission under **Privacy & To move the display to another computer, stop the old companion first. While the device is running normally, hold the left BOOT button for 3 seconds. After `PAIRING CLEARED`, the device restarts. Run `./companion/run.sh` on the new computer and enter the new six-digit pairing code. Do not hold BOOT during power-on or reset, because that enters ESP32 download mode. -## PlatformIO - -The PlatformIO project pins the major dependency versions used by the Waveshare Arduino example: - -- Arduino-ESP32 3.3.5 -- LVGL 8.4.0 -- Arduino_GFX 1.6.4 -- SensorLib 0.3.3 -- XPowersLib 0.2.6 - -After installing PlatformIO: - -```bash -pio run -``` - -The firmware image is written to: - -```text -.pio/build/esp32-s3-touch-amoled-216/firmware.bin -``` - -With the board connected: - -```bash -pio run -t upload -pio device monitor -``` - -If the download port is not detected, hold BOOT while connecting USB-C and release it when the port appears. Uploading replaces the firmware currently installed on the device. - ## Repository structure ```text diff --git a/README.md b/README.md index b076846..4d04121 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Waveshare ESP32-S3-Touch-AMOLED-2.16 的 Arduino 固件和 macOS Companion。设备通过加密 BLE 接收本机 Codex 的真实账户用量和任务状态,不在 ESP32 中保存 Codex 凭据。 -![首页设计稿](docs/ui/main-ring-open-arc-corrected-480.png) +![Codex Usage Display 实机照片](docs/device-photo.jpg) > 当前状态:首个可用硬件版本。固件、BLE Companion、全局 Hook、测试和 > PlatformIO 构建均已打通;目前只支持指定的 Waveshare 开发板和 macOS。 @@ -40,7 +40,38 @@ Waveshare ESP32-S3-Touch-AMOLED-2.16 的 Arduino 固件和 macOS Companion。设 `focus_codex` 会激活 Mac 上的 ChatGPT/Codex App;`refresh` 立即重新读取数据;`new_task` 使用 macOS 辅助功能发送 `⌘N`。 -## 使用 Arduino IDE +## 推荐:使用 PlatformIO + +项目主要使用 PlatformIO,并固定到与 Waveshare Arduino 示例相同的主要依赖版本: + +- Arduino-ESP32 3.3.5 +- LVGL 8.4.0 +- Arduino_GFX 1.6.4 +- SensorLib 0.3.3 +- XPowersLib 0.2.6 + +安装 PlatformIO 后执行: + +```bash +pio run +``` + +固件输出: + +```text +.pio/build/esp32-s3-touch-amoled-216/firmware.bin +``` + +连接开发板后烧录并查看串口: + +```bash +pio run -t upload +pio device monitor +``` + +如果首次烧录时没有识别到下载端口,按住 BOOT、连接 USB-C,看到端口后松开 BOOT。烧录会替换设备中现有固件。 + +## Arduino IDE(兼容方式) 直接打开 [esp32/esp32.ino](esp32/esp32.ino),不要在文件选择器里只选文件夹。Arduino IDE 会同时编译 `src/` 中的实际源码。 @@ -192,37 +223,6 @@ Hook 不保存 prompt 或 assistant 回复。它对本机所有 Codex 项目生 更换电脑时,先停止旧电脑上的 Companion,再在设备正常运行时长按左侧 BOOT 3 秒。看到 `PAIRING CLEARED` 后设备会自动重启;随后在新电脑运行 `./companion/run.sh`,输入设备显示的新六位配对码。不要在开机或复位过程中按住 BOOT,否则会进入 ESP32 下载模式。 -## 使用 PlatformIO - -项目使用 PlatformIO,并固定到与 Waveshare Arduino 示例相同的主要依赖版本: - -- Arduino-ESP32 3.3.5 -- LVGL 8.4.0 -- Arduino_GFX 1.6.4 -- SensorLib 0.3.3 -- XPowersLib 0.2.6 - -安装 PlatformIO 后执行: - -```bash -pio run -``` - -固件输出: - -```text -.pio/build/esp32-s3-touch-amoled-216/firmware.bin -``` - -连接开发板后烧录并查看串口: - -```bash -pio run -t upload -pio device monitor -``` - -如果首次烧录时没有识别到下载端口,按住 BOOT、连接 USB-C,看到端口后松开 BOOT。烧录会替换设备中现有固件。 - ## 代码结构 ```text diff --git a/docs/device-photo.jpg b/docs/device-photo.jpg new file mode 100644 index 0000000..fa3de8a Binary files /dev/null and b/docs/device-photo.jpg differ