cuu 1ca70d37d9 add eg cli commands in readme 2 年之前
..
etc 5e37a70a51 edit devterm-printer.service 3 年之前
usr ec9598f841 map adc node to /tmp/devterm_adc 2 年之前
.gitignore c6e3c43116 add CONFIG printf 3 年之前
Makefile fc8c648512 thermal_printer,temperature(),WringPi has no INPUT_ANALOG,now ASK4PAPER==HIGH issue left 3 年之前
README.md 1ca70d37d9 add eg cli commands in readme 2 年之前
config.h ec9598f841 map adc node to /tmp/devterm_adc 2 年之前
devterm_thermal_printer.c 2e449853c3 remove self test grid printing 2 年之前
logo.h 9278b6bad3 add schematic pdfs and firmware code 3 年之前
pcf_5x7-ISO8859-1_5x7.h 9278b6bad3 add schematic pdfs and firmware code 3 年之前
pcf_6x12-ISO8859-1_6x12.h 9278b6bad3 add schematic pdfs and firmware code 3 年之前
pcf_7x14-ISO8859-1_7x14.h 9278b6bad3 add schematic pdfs and firmware code 3 年之前
printer.c 4e06a6e213 add check_battery 3 年之前
printer.h 0824e292fd change max print pts with battery level 3 年之前
ttf_Px437_PS2thin1_8x16.h 9278b6bad3 add schematic pdfs and firmware code 3 年之前
ttf_Px437_PS2thin2_8x16.h 9278b6bad3 add schematic pdfs and firmware code 3 年之前
utils.c c6e3c43116 add CONFIG printf 3 年之前
utils.h fb12b78724 add PRINTF, StandardOutput for debugging 3 年之前

README.md

DevTerm Thermal printer

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

How to run it from source

  • make
  • sudo systemctl stop devterm-printer
  • sudo cp -rf devterm_thermal_printer.elf /usr/local/bin
  • sudo systemctl start devterm-printer