Web panel
File list, editor, live console, persistent log, WiFi / display / storage settings, TR/EN interface, keyboard shortcuts.
CYD Studio turns a cheap ESP32 or ESP8266 board into a web-managed project runner. Prepare the board once; after that there is no compiling at all. Projects are plain .py files, started and stopped with one click, several of them side by side.
The board serves a single-file web panel. You write a project in the editor, run it, watch its print() output live, stop it, and run another one next to it. The same panel and the same import cyd work on three different boards.
File list, editor, live console, persistent log, WiFi / display / storage settings, TR/EN interface, keyboard shortcuts.
Normal shares one thread, Thread gets its own, Solo reboots the board with all the RAM for one project (BLE, HTTPS).
Cooperative flag, then task cancellation, then a watchdog reset. A stuck project can never lock the panel for good.
cyd.rota('/path', fn) adds a route to the main server. Same port, no second socket, gone when the project stops.
The panel over a serial cable, no WiFi needed. A small PC tool serves it at 127.0.0.1:8080.
cyd.buton(pin, fn). Under load, polling caught 5 of 50 presses; the interrupt caught 50 of 50.
Board differences live in data, not in code: each board declares a feature map and the panel hides what the hardware does not have.
| Board | Hardware | Firmware | Projects at once |
|---|---|---|---|
| CYD ESP32-2432S028R | 320x240 ILI9341 display, XPT2046 touch, SD slot, RGB LED, light sensor, speaker | Custom image: frozen core, fixed 96 KB heap, RAM diet | 7 normal + 2–3 thread |
| NodeMCU ESP8266 | On-board LED, one analog input, 38 KB RAM | Custom image: frozen core, asyncio | 3 normal (no threads) |
| ESP32 OLED SSD1306 | 128x64 SSD1306 OLED | Stock MicroPython v1.28, core on the filesystem | 4+ |
Each project row has an N / T / S chip. Click to cycle; the choice is saved per file.
An asyncio task on one shared thread. cyd.sleep is rewritten to await on the fly. LEDs, sensors, small web pages: most projects.
Its own FreeRTOS thread, sliced by the GIL. Display drawing, tight loops without sleep, heavy computation.
The panel shuts down, the board reboots and one project gets all the RAM. RESET brings the panel back. BLE and HTTPS live here.
Two rules make everything else work: while not cyd.should_stop() instead of while True, and cyd.sleep() instead of time.sleep(). That is what lets Stop work and lets projects share the board.
import cyd from machine import Pin led = Pin(getattr(cyd, 'D1', 22), Pin.OUT, value=0) # NodeMCU: D1, CYD: GPIO22 try: while not cyd.should_stop(): # listen to the panel's Stop button led.value(1) if not cyd.sleep(0.5): break # interruptible wait (seconds) led.value(0) if not cyd.sleep(0.5): break finally: led.value(0) # clean up however the project ends
Clone the repository and install the PC tools: pip install mpremote esptool mpy-cross pyserial.
Copy boards/<board>/config.example.json to config.json and enter your network. The file never goes to git.
Write the image from firmware/ and run tools/deploy.py. The docs have the exact commands per board.
Go to http://<board-ip>/, write a file, press ▶. If WiFi fails the board opens its own access point.
The Workshop is where CYD Studio users share .py projects: a temperature logger, a night light, a touch demo. Browse by board and category, read the code in the browser, download it to your panel. Share anonymously or sign in with Nuvaka.
Only .py, .txt and .md files, up to 2 MB each and 5 files per project; 20 files per hour. Shared projects are published under the MIT license.
Everything measured on the boards, written down: memory, run modes, the cyd module, the HTTP API, known traps.
Install, flash, deploy, first project.
02The cyd module, the stop contract, do's and don'ts.
03N / T / S, heap vs internal DRAM, measured limits.
04Every endpoint of the on-board panel.
05A step-by-step tutorial for beginners (TR/EN).
06MIT licensed. Issues and pull requests welcome.
The ESP32-2432S028R ("Cheap Yellow Display"), the NodeMCU ESP8266 and an ESP32 with a 128x64 SSD1306 OLED. Adding a board means one cyd.py with a feature map and a config example; the core does not change.
No. Ready-made firmware images are in the repository. You flash once, deploy once, then everything happens in the browser. Rebuilding the firmware is only needed if you change the core.
Every RAM figure, stop latency and project count in the docs was measured on the real boards over the serial port, not estimated. If you change something, measure again.
Not next to the panel: internal DRAM is too tight. Both work in Solo mode, where the board reboots with all the RAM for one project; RESET brings the panel back.
Anyone. You can share anonymously with a nickname, or sign in with your Nuvaka account to keep your projects under your name and manage them later.
Yes. The code is MIT licensed on GitHub and the Workshop is free to use. The boards cost a few dollars.