How eli3162/diw_printer works
This repository implements firmware and browser-side tools for a low-cost direct-ink-writing 3D printer. The apparent workflow is to prepare or generate printer motion commands, execute them through the printer driver, and communicate with the device; the tree also includes a browser Python environment and editor/terminal assets. The README confirms the printer goal but does not document the browser workflow. Several browser relationships below are therefore shown only where imports are indexed, or left dashed when the runtime connection is not established by the available excerpts.
Main entry points: core-7nKZylPm.js PyScript runtime · codemirror_language-hp5FIdgW.js Editor language · codemirror-DEwTncU0.js CodeMirror editor · codemirror_commands-7WzQPAvy.js Editor commands
Components 23
Motion and G-code
- G-code parser
firmware/gcodeparser.py - Path slicing
firmware/gcodeparsing/slice.py - G-code generation
firmware/gcodeparsing/gcodegen.py - Generated runner
firmware/gcodeparsing/rungcode.py
Printer Hardware
- Printer motion driver
firmware/printerdriver.py - Serial command loop
firmware/main.py - BME680 sensor
firmware/bme680.py
Browser Python Tools
- Printer GUI
firmware/gui.py - PyScript runtime
firmware/pyscript/core-7nKZylPm.js - Pyodide runtime
firmware/pyscript/pyodide/pyodide.mjs - MicroPython runtime
firmware/pyscript/micropython/micropython.mjs - Python editor
firmware/pyscript/py-editor-CkR6M58-.js - CodeMirror editor
firmware/pyscript/codemirror-DEwTncU0.js - Editor state
firmware/pyscript/codemirror_state-bz5DyDhY.js - Editor view
firmware/pyscript/codemirror_view-B9awT57h.js - Editor language
firmware/pyscript/codemirror_language-hp5FIdgW.js - Editor commands
firmware/pyscript/codemirror_commands-7WzQPAvy.js - Python language support
firmware/pyscript/codemirror_lang-python-0Uzjxlfw.js - Browser terminal
firmware/pyscript/xterm-Bdboj2r8.js
Device Communication
- Serial communications
firmware/serialcom.py - Web Serial bridge
firmware/webserial.py - Web Serial client
firmware/script/webserial.js
Other components
- Printer operator
Connections 26
- Printer operator → G-code parser: provides commands
- Path slicing → G-code generation: provides paths
firmware/gcodeparsing/slice.py - G-code generation → Printer motion driver: generates driver script
firmware/gcodeparsing/gcodegen.py - Generated runner → Printer motion driver: uses driver
firmware/gcodeparsing/rungcode.py - Serial command loop → Printer motion driver: imports driver
firmware/main.py - Printer operator → Printer GUI: operates printer
- Printer GUI → PyScript runtime: uses runtime
- PyScript runtime → Python editor: loads editor support
firmware/pyscript/core-7nKZylPm.js - Python editor → PyScript runtime: uses runtime
firmware/pyscript/py-editor-CkR6M58-.js - PyScript runtime → Pyodide runtime: loads runtime
firmware/pyscript/core-7nKZylPm.js - CodeMirror editor → Editor state: imports state
firmware/pyscript/codemirror-DEwTncU0.js - CodeMirror editor → Editor view: imports view
firmware/pyscript/codemirror-DEwTncU0.js - CodeMirror editor → Editor language: imports language
firmware/pyscript/codemirror-DEwTncU0.js - CodeMirror editor → Editor commands: imports commands
firmware/pyscript/codemirror-DEwTncU0.js - Python language support → Editor language: extends language support
firmware/pyscript/codemirror_lang-python-0Uzjxlfw.js - Editor view → Editor state: imports state
firmware/pyscript/codemirror_view-B9awT57h.js - Editor language → Editor state: imports state
firmware/pyscript/codemirror_language-hp5FIdgW.js - Editor language → Editor view: imports view
firmware/pyscript/codemirror_language-hp5FIdgW.js - Editor commands → Editor state: imports state
firmware/pyscript/codemirror_commands-7WzQPAvy.js - Editor commands → Editor view: imports view
firmware/pyscript/codemirror_commands-7WzQPAvy.js - Editor commands → Editor language: imports language
firmware/pyscript/codemirror_commands-7WzQPAvy.js - PyScript runtime → Browser terminal: loads terminal support
firmware/pyscript/core-7nKZylPm.js - Web Serial bridge → Serial communications: imports communications
firmware/webserial.py - Web Serial client → Web Serial bridge: uses serial bridge
- Printer operator → Web Serial client: sends commands
- Serial communications → Serial command loop: communicates with firmware