PRINTDECKDOCS

Software

The printdeck program

One static Go binary: the Klipper host, the touch screen, the remote screen, the API for slicers and the display of the printer.

What the program does

The Printdeck runs Printdeck OS, a small read-only Linux system. os/README.md has the build, the install and the update.

deck/ is the Printdeck program: one static Go binary that runs as the user deck. It has these parts:

The print screen of the deck: the printer display, the layer, the roll and the model view
A print on the touch screen
The display of the printer with the temperatures, the progress and the time left
The display of the printer during a print

The screens are on the deck UI pages. The commands of the program are in the reference.

The goal

Printdeck is a very small operating system with one purpose: run one 3D printer and its touch screen. The goals are a small image, a fast start, and a low use of memory and CPU.

Where we are

StepWhat changesState
1A Buildroot image: read-only A/B system, Klipper, OctoPrint, and the deckDone
2The deck serves the remote screen and the API for slicers. OctoPrint goes.Done
3A Go port of the Klipper host (printdeck klippy). Python goes.Done. It printed on the TAZ Workhorse.
4The deck runs as the unprivileged user deck.Done in the image. To test on the Pi.

The Klipper port

A Go Klipper host can drive a heater or a motor in the wrong way. So the port follows these rules:

tools/klipper-reference makes the reference data. deck/internal/klipper/PORTING.md has the rules of the port.

The deck program

PackageWhat it does
cmd/printdeckThe program: the deck, the Klipper host (klippy), and the other commands
internal/klipperThe Go port of the Klipper host
internal/uiThe screens of the touch screen
internal/gfx, internal/fb, internal/touchDrawing, the framebuffer, and the touch screen
internal/printerThe printer state, the picture of the print, and the backends
internal/klippyThe client for the API socket of the Klipper host
internal/gcodestoreThe G-code files, in the folder of Klipper's virtual SD card
internal/octoapiThe OctoPrint-compatible API for slicers, with App Keys on the touch screen
internal/remoteThe remote screen in the browser
internal/gcode, internal/stlG-code and STL reading for the picture of the print
internal/lcdThe display of the printer: the status screen, the menus and the animations
internal/wifiWi-Fi through wpa_supplicant

Open source and licenses

Printdeck uses the work of other open source projects: Klipper, OctoPrint, Moonraker, Buildroot and the Linux kernel. We give the result back under a compatible license.

If you find code in Printdeck with a missing credit or license, please open an issue.

Built with AI

Much of Printdeck is written with an AI coding assistant (Claude), directed and reviewed by a person. That code follows the same rules: it respects the licenses above, gives credit, and passes its tests.

Demo mode

To see the screens with no hardware, run go run ./cmd/printdeck demo /tmp/shots in deck/. It writes PNG files. For the screens in a browser, run go run ./cmd/printdeck remote-demo and open http://localhost:8080 (password demo).

Work that remains