From 9db33b9eed7645bd1e2ab52aca95135946fd152d Mon Sep 17 00:00:00 2001 From: cuu Date: Mon, 27 Nov 2023 17:49:28 +1300 Subject: [PATCH] update thermal printer README DC2 # n --- Code/thermal_printer/README.md | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Code/thermal_printer/README.md b/Code/thermal_printer/README.md index 807e83c..5a0464e 100644 --- a/Code/thermal_printer/README.md +++ b/Code/thermal_printer/README.md @@ -44,27 +44,19 @@ https://github.com/clockworkpi/DevTerm/blob/81addc7f4ba1eb4acb2f59fb1fef70386dbe #### DC2 # n n:0-F, set printer printing density -``` -echo -en "\x12\x23\x0" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x1" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x2" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x3" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x4" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x5" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x6" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x7" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x8" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\x9" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\xa" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\xb" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\xc" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\xd" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\xe" > /tmp/DEVTERM_PRINTER_IN -echo -en "\x12\x23\xf" > /tmp/DEVTERM_PRINTER_IN -``` +If you want to set the printing depth (printer heating time), you can use the following command to set it: -default density is 6 +For the lightest: +`echo -en "\x12\x23\x0" > /tmp/DEVTERM_PRINTER_IN` + +For the darkest: + +`echo -en "\x12\x23\xf" > /tmp/DEVTERM_PRINTER_IN` + +There are a total of 16 levels from 0 to 0xf. The default density is 6. + +The heating time can be determined using the formula "n * (300 + n*46) microseconds." #### DC2 T print the test page