Thermal Printer

From Clockwork GameShell
Revision as of 01:01, 25 September 2021 by Ksbex (talk | contribs) (→‎Printer Commands)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Thermal Printer Components

Paper Roll Diameter

We provide you a vintage-feeling but practical expansion module - the thermal printer. It uses a standard 58mm thermal paper and has an easy-to-load design. With the open-source standard CUPS print driver provided by the clockworkOS, you can print various monochrome fonts, symbols, graphics, and even complete A4 size output through collage. You can also buy thermal printing paper* with adhesive backing or different colors, plan your work and life, mark key points, and give notes, anytime, anywhere. The sturdy “input tray” provides a storage function, allowing you to carry it freely.

The CUPS print driver is released under the GPL v3 license, and you can find it on our GitHub.

  • Safety reminder: It is recommended to use BPA-free thermal papers.

Paper Dimensions

The printer uses standard 58 mm thermal paper. Based on the published 3D models, the maximum diameter for a roll is about 42mm.

Printer Commands

The following examples are from the thermal printer driver readme.md on github.

Console commands example

echo "Hello DevTerm" > /tmp/DEVTERM_PRINTER_IN

echo -e "Hello DevTerm\n\n\n\n\n\n" > /tmp/DEVTERM_PRINTER_IN

cat file.txt > /tmp/DEVTERM_PRINTER_IN

ncal -hb | tee > /tmp/DEVTERM_PRINTER_IN

Eos/Pos commands example

ESC ! n

set printer font index,n:0-4

   echo -en "\x1b\x0" > /tmp/DEVTERM_PRINTER_IN

DC2 # n

n:0-F, set printer printing density

   echo -en "\x12\x23\x8" > /tmp/DEVTERM_PRINTER_IN

DC2 T

print the test page

   echo -en "\x12\x54" > /tmp/DEVTERM_PRINTER_IN

Thermal Printer Spec Sheet

The printer is a Xiamin liyin MTP02-I. The spec sheet is available on github.