GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ETO-ze/codex-oled-status-display: RP2040-Zero OLED carrier with local Codex Desktop status bridge

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
design
design
 
 
docs
docs
 
 
easyeda
easyeda
 
 
firmware
firmware
 
 
hardware
hardware
 
 
host
host
 
 
installer
installer
 
 
portable
portable
 
 
tests
tests
 
 
tmp/pdfs/hs20
tmp/pdfs/hs20
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
TEST_REPORT.md
TEST_REPORT.md
 
 
THIRD_PARTY_NOTICES.md
THIRD_PARTY_NOTICES.md
 
 
build_downloader.ps1
build_downloader.ps1
 
 
build_installer.ps1
build_installer.ps1
 
 
build_portable.ps1
build_portable.ps1
 
 
codex.eprj2
codex.eprj2
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
requirements.txt
requirements.txt
 
 
sign_release.ps1
sign_release.ps1
 
 

Repository files navigation

Codex OLED Status Display

一个独立的桌面状态显示器:本机 Codex Desktop 的活动状态通过 USB-C 发送到 RP2040-Zero,在 1.3 英寸 SH1106 OLED 和三色 LED 上实时显示。

本项目只在本机读取 Codex session 事件类型。不会将提示词、回复文本、工具参数 或工具输出发送到开发板。

DuskRain startup frames

Windows status preview

Features

  • Native EasyEDA Professional project — editable codex.eprj2, including the carrier PCB, board outline, OLED connector, RP2040-Zero footprint, mounting holes and LED footprints.
  • One USB-C cable — the RP2040-Zero's onboard USB-C supplies power, MicroPython upload and USB CDC status transport.
  • Live Codex status — THINK, TOOL, DONE and ERROR derive from local Codex Desktop session events. Intermediate commentary never becomes DONE.
  • Current-action ticker — a 42-character horizontal activity feed reports safe stages such as planning, editing files, running checks and waiting for a process. Prompts, replies, command text and tool arguments are never shown.
  • Active task counter — the OLED's top-right corner shows T0, T1, T2 and so on for the number of Codex tasks currently executing.
  • Five themed animations — sleeping-cat standby, orbiting idea particles, an active build conveyor, check-mark confetti and a glitching warning scene make each state visually distinct on the monochrome display.
  • DuskRain home page — supplied SH1106 startup animation is preserved, then a compact live status panel is rendered over the home screen.
  • Cat-nap standby loop — after DONE remains visible for 12 seconds, the bridge enters IDLE and the OLED shows a four-frame sleeping-cat, drifting-Z and twinkling-star animation until the next Codex event.
  • Three hardware indicators — red fault, yellow while any project is active, and green only when Codex is connected and all recent projects are idle LEDs are controlled by GP0/GP1/GP2.
  • Local preview — a Windows always-on-top preview mirrors the compact display and publishes the same newline-delimited JSON to the board.

Architecture

flowchart LR
    A[Codex Desktop local session log] --> B[Python activity bridge]
    B --> C[status.json]
    C --> D[Windows preview + USB publisher]
    D -->|USB CDC · 115200 baud| E[Waveshare RP2040-Zero]
    E --> F[SH1106 128×64 OLED]
    E --> G[Red / Yellow / Green LED]
Loading

For the full state mapping and data-boundary explanation, see docs/WORKFLOW.md.

Hardware

Item Selection
Controller Waveshare RP2040-Zero, onboard USB-C
Display 1.3-inch 128×64 monochrome SH1106 I2C OLED
I2C pins GP4 = SDA, GP5 = SCL
Status LEDs GP0 red, GP1 yellow, GP2 green; active-low
Carrier size 35.40 × 42.00 mm, two-layer
Mounting Four M3 / 3.2 mm NPTH holes

The OLED header is GND / 3V3 / SCL / SDA. Use 3.3 V, not 5 V. See the BOM, schematic and assembly instructions before ordering or soldering.

Quick start

1. Open or manufacture the PCB

Open codex.eprj2 in EasyEDA Professional. The source/project handling notes are in easyeda/README.md. Re-run DRC and generate fabrication files from the revision you plan to manufacture.

2. Flash the RP2040

Install MicroPython for RP2040 on the RP2040-Zero, then upload every .py file from firmware/micropython/ to its root filesystem using Thonny or mpremote. Reset the board. The default OLED I2C address is 0x3C; 0x3D is also accepted.

py -m mpremote connect COM20 fs cp .\firmware\micropython\main.py :main.py
py -m mpremote connect COM20 reset

Upload the animation and driver modules as well on a new board. Details are in firmware/micropython/README_CODEX.md.

3. Start the local bridge and display preview

Connect the RP2040-Zero by USB-C, then run:

cd H:\playfround\codex_oled_display
powershell -ExecutionPolicy Bypass -File .\host\run_codex_oled.ps1

The script installs pyserial if needed, finds the RP2040 serial port, starts the local Codex event bridge and opens the status window. If the board is unplugged and reinserted, it re-enumerates the USB device every 1.5 seconds and resends the current Codex state automatically. Use -Port COM20 to override automatic detection.

To start the bridge automatically whenever the current Windows user signs in, install the included Startup-folder shortcut once:

powershell -ExecutionPolicy Bypass -File .\host\install_autostart.ps1

Automatic port detection is recommended because Windows may assign a different COM number after moving the device. To pin a port, append -Port COM7. Remove the startup entry with host\uninstall_autostart.ps1.

Portable Windows package

Run build_portable.ps1 to produce a standalone Windows executable and ZIP:

powershell -ExecutionPolicy Bypass -File .\build_portable.ps1

The resulting release/CodexOLED-Portable-Windows-x64.zip can be copied to a different Windows x64 computer. The user only needs to connect the programmed RP2040-Zero and double-click CodexOLED.exe; Python, pip and a fixed COM number are not required. The package also contains an optional current-user sign-in startup installer.

The Startup shortcut launches silently in the Windows notification area. The desktop shortcut opens a dark control center with the live OLED preview, Codex activity, RP2040/COM connection state, reconnect and log controls. If the runtime is already active, the shortcut reveals that existing single instance. The cat tray icon can also show or hide the control center and exit the app. For self-signing and trusted public distribution options, see docs/SIGNING.md.

Online bootstrapper (development)

Run build_downloader.ps1 to create release/CodexOLED-Bootstrap-Windows-x64.exe. This single-file bootstrapper downloads the latest GitHub Release, requires and verifies the matching SHA-256 sidecar, installs under %LOCALAPPDATA%\CodexOLED, optionally creates the current-user startup shortcut, and launches the app. A valid Release must contain both CodexOLED-Portable-Windows-x64.zip and CodexOLED-Portable-Windows-x64.zip.sha256.

Standard offline installer

For a conventional Windows setup wizard with license, destination, shortcut, startup and ready-to-install pages, install Inno Setup 6 and run:

.\build_installer.ps1 -CertificateThumbprint <your-code-signing-thumbprint>

The resulting CodexOLED-Setup-Windows-x64.exe embeds the complete signed runtime, so first installation cannot stall on GitHub access. It installs per user without administrator rights and includes a normal uninstaller.

Repository layout

codex.eprj2                 Native EasyEDA Professional project
easyeda/                    EasyEDA project/opening instructions
hardware/                   Electrical spec, schematic and BOM
firmware/micropython/       Deployed RP2040 MicroPython firmware and frames
host/                       Local Codex bridge, serial publisher and preview
docs/                       Assembly, workflow, verification and images

Status protocol

The USB payload is one UTF-8 JSON object per newline at 115200 baud:

{"frame":"TOOL","detail":"TOOL EXEC","online":true,"active_count":2}

Normal frames are IDLE, THINK, TOOL, DONE and ERROR. The additional TEST frame turns on all three LEDs for assembly checks. The RP2040 sends a CODEX ACK ... line after accepting a changed status.

For non-idle states, detail is rendered as a continuous horizontal ticker. The local bridge derives this label from a fixed allowlist of activity classes; it does not forward session text or tool parameters to the serial device.

Verification

Source compilation, bitmap validation, COM20 deployment, serial acknowledgments and a local Codex-to-OLED end-to-end transfer have been tested. See docs/TESTING.md and TEST_REPORT.md.

Attribution and license

This project is released under the MIT License. The project owner has authorized public redistribution of the supplied DuskRain animation bundle; see THIRD_PARTY_NOTICES.md.

About

RP2040-Zero OLED carrier with local Codex Desktop status bridge

Topics

codexeasyedamicropythonoledrp2040sh1106

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.