ESP32-C6 · 128×64 OLED · 3 KEYS · MIT PHOSPHOR

*** PET-PC ***

READY.

A Commodore PET–style desk terminal on an ESP32-C6.

A clock, the weather, your Home Assistant lights — and two keys that do whatever you tell them to. It boots into BASIC, loads the weather from tape, and fills the screen with 10 PRINT when you leave it alone.

PET-PC on a desk, its screen booting into BASIC, loading the weather from tape and cycling through its screens

A render of the case with the real firmware's screens playing: boot, tape loading, the clocks, BASIC, the 10 PRINT maze.

What it does

Three keys, one OLED

A 128×64 screen and three mechanical key switches on a Waveshare ESP32-C6-Zero. No hub, no cloud, no YAML — it fetches everything itself.

Seven screens

PETSCII block clock, a classic clock, weather, a BASIC READY. prompt, a live program LISTing, Home Assistant, system status.

Keys you configure

Each outer key has a press and a hold action: call a webhook, jump to a screen, toggle a light, run a scene, cycle a selector.

Home Assistant, optional

Show sensors and switch lights from the keys, over HA's REST API with a long-lived token — nothing to install on the HA side.

Retro all the way down

BASIC boot banner, PRESS PLAY ON TAPE around every weather fetch, CRT wipes, a power-off collapse — and a web page with scanlines.

Kind to the OLED

Modest brightness, a night schedule that switches the panel off, burn-in pixel shift and a screensaver keep the panel young.

Screens

The centre key steps through them; pick which ones — and the one it starts on — from the web page.

The firmware's screens: boot, tape loading, block clock, weather, HOME, BASIC, the 10 PRINT maze
Block clock
Block clockPETSCII block digits — the default start screen
Clock
Clocklarge time, WiFi, weather strip
Weather
Weatherfeels-like, humidity, wind, today's range, rain
HOME
HOMEHome Assistant entities — press to pick, hold to toggle
LIST
LISTthe live data as a BASIC program; TI$ ticks
BASIC
BASICthe centre key types and runs commands
System
Systemaddress, signal, uptime, memory, sync
Boot banner
BootBASIC banner, memory count-up, then WiFi
10 PRINT maze
Screensaver10 PRINT CHR$(205.5+RND(1));

Weather, loaded from tape

Every refresh plays LOAD "WEATHER" → PRESS PLAY ON TAPE #1 → SEARCHING → LOADING, does the real fetch at that step, then RUNs it. Screen changes get a scan-line wipe or a vertical-hold roll, and at night the picture collapses to a line and a dot like a CRT switching off. All of it can be turned off.

PRESS PLAY ON TAPE, SEARCHING FOR WEATHER
RUN prints the weather

The web page

Everything is set from http://pet-pc.local/ — no app, no reflashing. The page lives in the firmware, so it works over the device's own hotspot too. Every setting explains itself; Save waits until the settings have loaded, sends only what changed, and flags a bad value before it is sent — ?SYNTAX ERROR.

Live tab
Livethe OLED mirrored, and three virtual keys
Keys tab
Keysa press and a hold action per key, with Try it
Home Assistant tab
Home Assistantconnection test, entities with live values
Display tab with an unsaved change
Displayan unsaved change: marked, tab starred, Save bar

Hardware

PartNotes
Waveshare ESP32-C6-ZeroESP32-C6, 4 MB flash, native USB-C for flashing and serial
SSD1306 128×64 I²C OLED (0.96″)the common 4-pin module, address 0x3C, powered from 3.3 V
3 × MX-style key switchesclicky or tactile — the switch is the only click there is
A PET-style case3D-printable — on Printables — or any box with three 14 × 14 mm cutouts

No resistors, diodes or matrix: each key goes from a GPIO to ground, and the OLED sits on four consecutive header pins — one straight ribbon. OLED on GP0/GP1, keys on GP18/GP19/GP20. Full pin map and assembly notes in WIRING.md.

Exploded view: base with three Cherry MX switches, the ESP32-C6-Zero and its holder with one M2 screw, the main frame, keycaps, the monitor with its display and screen frame
What's insidebase and switches, the ESP32-C6-Zero under its holder (one M2 screw), the main frame, the monitor with the OLED

3D-printable case

The PET-style case — seven parts, print-ready 3MF and STLs, and an 8-page illustrated build guide — is on Printables. It prints in about 2 h 40 min from ~68 g of PLA; everything is press-fit except two small glued trim parts and one screw.

Get the 3D models

Quick start

You need PlatformIO Core 6.2 or newer and a USB-C data cable.

git clone https://github.com/Krasnov777/esp32-pet-pc.git
cd esp32-pet-pc/firmware
pio run -t upload        # builds and flashes over USB-C
  1. On first boot PET-PC opens a hotspot, PET-PC-XXXX. Join it and browse to http://192.168.4.1/.
  2. Network tab: your WiFi (2.4 GHz). Save — PET-PC restarts and joins it.
  3. Browse to http://pet-pc.local/: pick your time zone and location, set the keys. Done.

Later updates go over WiFi: pio run -e ota -t upload --upload-port <device-ip>. Settings survive every update.

Home Assistant

In HA, create a long-lived access token (profile → Security). On PET-PC's page, enter the HA URL, the token and up to six entities — each a Value (a temperature, a status) or a Switch (ON/OFF, toggled from the centre key). The outer keys can also toggle any entity or call any service: scene.turn_on, script.turn_on, input_select.select_next. The token is write-only and never leaves for a server it was not entered for.