Tutorial: Arduino and a Thermal Printer
This is chapter thirty-eight of a series originally titled “Getting Started/Moving Forward with Arduino!” by John Boxall – a series of articles on the Arduino universe. The first chapter is here, the complete series is detailed here. Any files from tutorials will be found here.
Please note that the tutorials are not currently compatible with Arduino IDE v1.0. Please continue to use v22 or v23 until further notice.
Welcome back fellow arduidans!
In this article we introduce the inexpensive thermal printer that has recently become widely available from Sparkfun and their resellers. The goal of the article is to be as simple as possible so you can get started without any problems or confusion. In the past getting data from our Arduino to a paper form would either have meant logging it to an SD card then using a PC to finish the job, or perhaps viewing said data on an LCD then writing it down. Not any more – with the use of this cheap and simple serial printer. Before we get started, here is a short demonstration video of it in action:
Not bad at all considering the price. Let’s have a look in more detail. Here is the printer and two matching rolls of thermal paper:
… and the inside of the unit:
Loading paper is quite simple, just drop the roll in with the end of the paper facing away from you, pull it out further than the top of the front lip, then close the lid. The paper rolls required need to be 57mm wide and have a diameter of no more than 39mm. For example. There is a piece of white cardboard stuck to the front – this is an economical cover that hides some of the internals. Nothing of interest for us in there. The button next to the LED on the left is for paper advance, and the LED can blink out the printer status.
From a hardware perspective wiring is also very simple. Looking at the base of the printer:
… there are two connections. On the left is DC power, and data on the right. For this example I have fitted my own rubber feet to stop the printer rocking about. Thankfully the leads are included with the printer and have the plugs already fitted – a great time saver.
Please note – you need an external power supply with a voltage of between 5 and 9 volts DC that can deliver up to 1.5 amps of current. When idling the printer draws less than 10 milliamps, but when printing it peaks at around 1.47 A. So don’t try and run it from your Arduino board. Furthermore you need to ensure the GND from your printer runs to the power supply GND and the Arduino GND. However the data lines are easy, as the printer has a serial interface we only need to connect printer RX (white) to Arduino digital 3, and printer TX (green) to Arduino digital 2. We will use a virtual serial port on pins 2 and 3 as 0 and 1 will be taken for use with the serial monitor window for debugging and possible control purposes.
If you want to quickly test your printer – connect it to the power, drop in some paper, hold down the feed button and turn on the power. It will quickly produce a test print.
Next we need to understand how to control the printer in our sketches. Consider this very simple sketch (download):
/*
Example 38.1 - Sparkfun Thermal Printer Test (COM-10438)
http://tronixstuff.wordpress.com/tutorials > chapter 38
Based on code by Nathan Seidle of Spark Fun Electronics 2011
http://littlebirdelectronics.com/products/thermal-printer
*/
#include
NewSoftSerial Thermal(2, 3); // printer green to digital 2, printer white to digital 3
int heatTime = 80;
int heatInterval = 255;
char printDensity = 15;
char printBreakTime = 15;
void setup()
{
Serial.begin(57600); // used for debugging via serial monitor
Thermal.begin(19200); // used for writing to the printer
initPrinter();
}
void initPrinter()
{
//Modify the print speed and heat
Thermal.print(27, BYTE);
Thermal.print(55, BYTE);
Thermal.print(7, BYTE); //Default 64 dots = 8*('7'+1)
Thermal.print(heatTime, BYTE); //Default 80 or 800us
Thermal.print(heatInterval, BYTE); //Default 2 or 20us
//Modify the print density and timeout
Thermal.print(18, BYTE);
Thermal.print(35, BYTE);
int printSetting = (printDensity<<4) | printBreakTime;
Thermal.print(printSetting, BYTE); //Combination of printDensity and printBreakTime
Serial.println();
Serial.println("Printer ready");
}
void loop()
{
Thermal.println(" Visit http://tronixstuff.com ");
Thermal.print(10, BYTE); // Sends the LF to the printer, advances the paper
Thermal.print(" Millis = ");
Thermal.println(millis());
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
do { } while (1>0);
}
After ensuring your printer is connected as described earlier, and has the appropriate power supply and paper – uploading the sketch will result in the following:
Now that the initial burst of printing excitement has passed, let’s look at the sketch and see how it all works. The first part:
#include <NewSoftSerial.h> NewSoftSerial Thermal(2, 3); // printer RX to digital 2, printer TX to digital 3
configures the virtual serial port and creates an instance for us to refer to when writing to the printer. Next, four variables are defined. These hold parameters used for configuring the printer. As the printer works with these settings there is no need to alter them, however if you are feeling experimental nothing is stopping you. Next we have the function initPrinter(). This sets a lot of parameters for the printer to ready itself for work. We call initPrinter() only once – in void setup(); For now we can be satisfied that it ‘just works’.
Now time for action – void loop(). Writing text to the printer is as simple as:
Thermal.print("text");
You can also use .println to advance along to the next line. Generally this is the same as writing to the serial monitor with Serial.println() etc. So nothing new there. Each line of text can be up to thirty-two characters in length.
The next thing to concern ourselves with is sending commands to the printer. You may have noticed the line
Thermal.print(10, BYTE);
This sends the command to advance to the next line (in the old days we would say ‘carriage return and line feed’). There are many commands available to do various things. When sending commands, don’t use .println() - as this sends the carriage return as well. At this point you will need to refer to the somewhat amusing user manual.pdf. Open it up and have a look at section 5.2.1 on page ten. Notice how each command has an ASCII, decimal and hexadecimal equivalent? We will use the decimal command values. So to send them, just use:
Thermal.print(value, BYTE);
Easy. If the command has two or more values (for example, to turn the printer offline [page 11] ) – just send each value in a separate statement. For example:
Thermal.print(27, BYTE);
Thermal.print(61, BYTE);
Thermal.print(0, BYTE);
… will put the printer into offline mode.
For out next example, let’s try out a few more commands:
- Underlined text (the printer seemed to have issues with thick underlining, however your experience may vary)
- Bold text
- Double height and width
/*
Example 38.2 - Sparkfun Thermal Printer Test II (COM-10438)
http://tronixstuff.wordpress.com/tutorials > chapter 38
Based on code by Nathan Seidle of Spark Fun Electronics 2011
http://littlebirdelectronics.com/products/thermal-printer
*/
#include
NewSoftSerial Thermal(2, 3); // printer RX to digital 2, printer TX to digital 3
int heatTime = 80;
int heatInterval = 255;
char printDensity = 15;
char printBreakTime = 15;
void setup()
{
Serial.begin(57600); // for debug info to serial monitor
Thermal.begin(19200); // to write to our new printer
initPrinter();
}
void initPrinter()
{
//Modify the print speed and heat
Thermal.print(27, BYTE);
Thermal.print(55, BYTE);
Thermal.print(7, BYTE); //Default 64 dots = 8*('7'+1)
Thermal.print(heatTime, BYTE); //Default 80 or 800us
Thermal.print(heatInterval, BYTE); //Default 2 or 20us
//Modify the print density and timeout
Thermal.print(18, BYTE);
Thermal.print(35, BYTE);
int printSetting = (printDensity<<4) | printBreakTime;
Thermal.print(printSetting, BYTE); //Combination of printDensity and printBreakTime
Serial.println();
Serial.println("Printer ready");
}
void loop()
{
// underline - one pixel
Thermal.print(27,BYTE);
Thermal.print(45,BYTE);
Thermal.print(1,BYTE);
Thermal.println("Underline - thin");
Thermal.println("01234567890123456789012345678901");
Thermal.print(10,BYTE);
// underline - two pixels
Thermal.print(27,BYTE);
Thermal.print(45,BYTE);
Thermal.print(2,BYTE);
Thermal.println("Underline - thick");
Thermal.println("01234567890123456789012345678901");
Thermal.print(10,BYTE);
// turn off underline
Thermal.print(27,BYTE);
Thermal.print(45,BYTE);
Thermal.print(0,BYTE);
delay(3000);
Thermal.print(10,BYTE);
// bold text on
Thermal.print(27,BYTE);
Thermal.print(32,BYTE);
Thermal.print(1,BYTE);
Thermal.println(" #### Bold text #### ");
Thermal.println("01234567890123456789012345678901");
delay(3000);
// bold text off
Thermal.print(27,BYTE);
Thermal.print(32,BYTE);
Thermal.print(0,BYTE);
Thermal.print(10, BYTE); //Sends the LF to the printer, advances the paper
delay(3000);
// height/width enlarge
Thermal.print(29,BYTE);
Thermal.print(33,BYTE);
Thermal.print(255,BYTE);
Thermal.println("ABCDEF");
Thermal.println("012345");
delay(3000);
// back to normal
Thermal.print(29,BYTE);
Thermal.print(33,BYTE);
Thermal.print(0,BYTE);
delay(3000);
Thermal.print(10, BYTE);
Thermal.println("Back to normal...");
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
do { } while (1>0); // do nothing
}
And the results:
Frankly bold doesn’t look that bold, so I wouldn’t worry about it too much. However the oversized characters could be very useful, and still print relatively quickly.
Next on our list are barcodes. A normal UPC barcode has 12 digits, and our little printer can generate a variety of barcode types – see page twenty-two of the user manual. For our example we will generate UPC-A type codes and an alphanumeric version. Alphanumeric barcodes need capital letters, the dollar sign, percent sign, or full stop. The data is kept in an array of characters named … barCode[] and barCode[]2. Consider the functions printBarcode(), printBarcodeThick() and printBarcodeAlpha() in the following example sketch (download):
/*
Example 38.3 - Sparkfun Thermal Printer Test III (COM-10438)
http://tronixstuff.wordpress.com/tutorials > chapter 38
Based on code by Nathan Seidle of Spark Fun Electronics 2011
http://littlebirdelectronics.com/products/thermal-printer
*/
#include
NewSoftSerial Thermal(2, 3); // printer RX to digital 2, printer TX to digital 3
int heatTime = 80;
int heatInterval = 255;
char printDensity = 15;
char printBreakTime = 15;
char barCode[]={ '9','2','3','0','5','6','4','8','9','8','4','4'};
char barCode2[]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P' };
void setup()
{
Serial.begin(57600); // for debug info to serial monitor
Thermal.begin(19200); // to write to our new printer
initPrinter();
}
void initPrinter()
{
//Modify the print speed and heat
Thermal.print(27, BYTE);
Thermal.print(55, BYTE);
Thermal.print(7, BYTE); //Default 64 dots = 8*('7'+1)
Thermal.print(heatTime, BYTE); //Default 80 or 800us
Thermal.print(heatInterval, BYTE); //Default 2 or 20us
//Modify the print density and timeout
Thermal.print(18, BYTE);
Thermal.print(35, BYTE);
int printSetting = (printDensity<<4) | printBreakTime;
Thermal.print(printSetting, BYTE); //Combination of printDensity and printBreakTime
Serial.println();
Serial.println("Printer ready");
}
void printBarcode(char zz[])
{
Thermal.print(29, BYTE); //GS
Thermal.print(107, BYTE); //k
Thermal.print(0, BYTE); //m = 0
for (int z=0; z<12; z++)
{
Thermal.print(zz[z]);
}
Thermal.print(0, BYTE); // bar code terminator
delay(3000); // necessary delay
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
}
void printBarcodeThick(char zz[])
{
Thermal.print(29, BYTE); // specified height of barcode
Thermal.print(104, BYTE);
Thermal.print(200, BYTE); // 200 pixels high (default is 50)
Thermal.print(29, BYTE); //GS
Thermal.print(107, BYTE); //k
Thermal.print(0, BYTE); //m = 0
for (int z=0; z<12; z++)
{
Thermal.print(zz[z]);
}
Thermal.print(0, BYTE); // bar code terminator
delay(3000); // necessary delay
Thermal.print(29, BYTE); // specified height of barcode
Thermal.print(104, BYTE);
Thermal.print(50, BYTE); // need to set back to 50 pixel height
delay(3000);
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
}
void printBarcodeAlpha(char zz[])
{
Thermal.print(29, BYTE); //GS
Thermal.print(107, BYTE); //k
Thermal.print(4, BYTE); //m = 0
for (int z=0; z<16; z++)
{
Thermal.print(zz[z]);
}
Thermal.print(0, BYTE); // bar code terminator
delay(3000); // necessary delay
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
Thermal.print(10, BYTE);
}
void loop()
{
printBarcode(barCode);
printBarcodeThick(barCode);
printBarcodeAlpha(barCode2);
do {} while (1>0);
}
Notice in printBarcodeThick() we make use of the ability to change the vertical size of the barcode – the height in pixels is the third parameter in the group. And here is the result:
So there you have it – another practical piece of hardware previously considered to be out of our reach – is now under our control. Now you should have an understanding of the basics and can approach the other functions in the user guide with confidence. Please keep in mind that the price of this printer really should play a large part in determining suitability for a particular task. It does have issues printing large blocks of pixels, such as the double-width underlining and inverse text. This printer is great but certainly not for commercial nor high-volume use. That is what professional POS printers from Brother, Star, Epson, etc., are for. However for low-volume, personal or hobby use this printer is certainly a deal. As always, now it is up to you and your imagination to put this to use or get up to other shenanigans.
This article would not have been possible without the example sketches provided by Nathan Seidle, the founder and CEO of Sparkfun. If you meet him, shout him a beer. Please don’t knock off bus tickets or so on. I’m sure there are heavy penalties for doing so if caught.
Update! adafruit are also selling these printers, and have written their own completely awesome library as well as a matching tutorial.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Like this:
July 8, 2011 - Posted by John Boxall | arduino, education, microcontrollers | arduino, barcode, bitmap, COM-10438, COM-10560, DIY, duemilanove, how, interface, inverse, learn, lesson, lessons, printer, serial, sparkfun, thermal, to, tronixstuff, tutorial, tutorials, understand, uno
44 Comments »
Leave a Reply Cancel reply
YouTube
Visit tronixstuff on YouTube for our range of videosClock Projects
Arduino Tutorials
Click for Detailed Chapter Index
Chapters 0 1 2 3 4
Chapters 5 6 6a 7 8
Chapters 9 10 11 12 13
Ch. 14 - XBee
Ch. 15 - RFID
Ch. 16 - Ethernet
Ch. 17 - GPS part I
Ch. 18 - RGB matrix
Ch. 19 - GPS part II
Ch. 20 - I2C bus part I
Ch. 21 - I2C bus part II
Ch. 22 - AREF pin
Ch. 23 - Touch screen
Ch. 24 - Monochrome LCD
Ch. 25 - Analog buttons
Ch. 26 - Arduino + GSM - part I
Ch. 27 - Arduino + GSM - part II
Ch. 28 - Colour LCD
Ch. 29 - TFT LCD
Ch. 30 - Arduino + twitter
Ch. 31 - Inbuilt EEPROM
Ch. 32 - Infra-red control
Ch. 33 - Control AC via SMS
Ch. 34 - SPI bus part I
Ch. 35 - Video-out
Ch. 36 - SPI bus part II
Ch. 37 - Timing with millis()
Ch. 38 - Thermal Printer
Ch. 39 - NXP SAA1064
Ch. 40 - Push wheel switches
Ch. 40a - Wheel switches II
Ch. 41 - More digital I/O
Ch. 42 - Numeric keypads
Ch. 42a - Keypads II
Ch. 43 - Port Manipulation
Ch. 44 - ATtiny+Arduino
Ch. 45 - Ultrasonic Sensor
Ch. 46 - Analog + buttons IISearch
RSS Feeds
Categories
Previous posts
Archives
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
Contact information
email - john at tronixstuff dot com
Google Group
Australian Electronics!
Buy and support Silicon Chip - Australia's only Electronics Magazine.Creative Commons
All the original material in this website, unless noted otherwise, is covered under a Creative Commons Attribution-Non Commercial-Share Alike v3.0 license. Please email me if you see any mis-attributions or would like to use my content in different circumstances.on twitter…
- Congratulations @telstra - activated the 1000th LTE base station: bit.ly/LFUjRk 1 day ago
-
Flickr Photos



More Photos Find me on…
Interesting Sites
David L. Jones' eev blog
Freetronics Arduino Geniuses!
Little Bird Electronics Service Powered Electronics!
Silicon Chip magazine Always a great read!
Amazing Arduino Shield Directory
The Amp Hour podcast
EEWeb Elec Engineering Forum
Superhouse.tv High-tech home renovation
Mr Dick Smith OANuclear weapons = global suicide
In a war with nuclear weapons, everybody loses. Please check these out:
Count Down to Zero
The War Game
Threads







Hey that’s amazing tutorial using Arduino and thermal printer, good on you. Thank you for sharing!
for next tutorial can you make tutorial using CmuCam with Arduino?
thank you b4…
Not unless someone wants to pay for it first.
Cheers
john
A very nice tutorial!
I’m a beginner of Arduino, and I want to connect a Zebra TLP 2844 Thermal Printer to my Mega 2560
Does this way also support this kind of printer?
Thanks!
After a quick look at the programming manual and user guide, you could control the version that had the serial interface. It has a 9600 bps interface, which the Arduino can talk to. However you should check with Zebta as to the voltage line levels and also check that there are serial commands to do what you want before committing to it.
Have fun
Thank you very much!
I will try.
Which pins on serial port do I need to connect to Arduino?
I’m using the serial port which has total 9 pins.
Hello
Without trying to sound too negative I can’t help you with this printer, as I don’t have one to test my advice.
Please contact Zebra with regards to technical details etc. They should be able to supply you with the pinouts and so on. Generall in these situations you will need the RX and TX and GND lines, however you may need to use a serial voltage converted IC such as MAX232 if the printer has a 3.3V serial line (this will cause problems as the Arduino is 5V serial).
what is Thermal.print function?? Thermal.begin(19200) ?? Can you also display this function?
Thermal.print() sends data to the printer to be printer. Thermal.begin(19200) creates an instance of the printer in the software to it can be addressed.
It is the same as Serial.xx commands – but to the printer instead of the serial monitor. See http://arduino.cc/en/Reference/Serial
Thanks John Boxall… So your mean is Thermal.print(10, BYTE); and Serial.println(“Printer ready”); is same functions only targeting device is different? and when you write for printer that u are sending Thermal.print(10, BYTE); then only decimal 10 is sent to the serial port where printer is connected?
Sort of … Thermal.print(10, BYTE); sends a line feed and carriage return to the printer … Serial.println(“Printer ready”); sends
Printer Ready
to the serial monitor window.
So , if I want to print “HIREN” on thermal printer then I have to send “HIREN” and then line feed only. Is this ok? if not can you tell me exact procedure to print character..
Can this code work for any ESC commend set thermal printer?
Please have a good read of the article and the example sketches – it really is self-explanatory.
Nice tutorial!
For those who want to print pictures with this printer, you can have a look at my thermal printer lib for .Net.
https://github.com/yukimizake/ThermalDotNet/blob/master/ThermalDotNet/ThermalPrinter.cs
I’m trying to add as features as possible to my lib.
It’s in C# but maybe it can give you some ideas!
I found this article very interesting and informative.
Thanks!
Hi.
Look like sure electronics have the same device, but with an english manual :
http://www.sure-electronics.net/download/DC-OT11115_V1.0_EN.pdf
My printer seem to be the same but with differents default settings (9600bps). But i can print reverse (29,66,1), bold (27,69,1), etc…
This manual is buggy but understandable.
Hi: I bougth a couple of those printers and I cant to make it run.
it blinks twice before power up. user manual reads: “Flash2 times: Not detect printer”
what could this mean?
neither have a startup test print (pressing feed button on power up)
any thoughts?
thank you very much. !
Check your power supply – it needs to offer between 5 and 9V at 1.5A.
john
your webpage is excellent!
thank you so much!
a question though.. what if i want to print, not on those circular inputer papers, but on a standard piece of paper.
lets say a small paper which is 3 inches long, 1.3 inches wide
obviously i cannot do this with this printer because of the feed. then what ways do i have to print to it. are there custom printers out there or printers for this size?
Thanks again!
You can get dot-matrix receipt printers (etc.) that use plain paper with a small ink ribbon such as the older point of sale printers. Just make sure it has a 5V TTL serial interface to make connection simple.
Do you know if the thermal printer is capable of just printing a dot and just advancing the paper one dot at a time? Not advancing a full size ASCII character.
I want to create a chart that prints a dot every 10 seconds, I’m charting 3 sensors, so it would be 3 dots that eventually become a trend-line for each of the three readings.
I want to have a printed chart of the sensor readings over 24 hr period.
Thank you in advance.
I had another look through the ‘user manual’, no – this isn’t possible. Perhaps try and get one of those old ECG/lie detector type of things?
If you can live without real-time viewing perhaps log the data to an SD card then review in a spreadsheet?
cheers
john
Thank you. I do datalogging now with the Adafruit SD logger. I have a process that runs for 24 hours and it would be ideal to see the progress at a glance.
Actually I’m thinking of modifying a larger thermal printer (old fax) with two stepper motors to do the X and Y and then command the heating element, or just the old type of marker on the round paper dataloggers.
Thank you for checking on that.
No worries. Have fun!
Help me please, i need to change bauderate settings, my comes 9600bps default, need 19200 to work with my Psoc code.
Thks
It only works on 9600bps.
hi this is very fantastic project. I built it above instruction. It works. But it prints to very strange characters. What will I do? my printer version is cashino thermal printer A3 like this printer. And sorry of my language.
You need to check the instructions for your model printer and determine the correct ESC code to set the appropriate character set.
thank you for your advice. Then I compare this 2 printer user manual. ESC code is same. plz help
Which printer do you have? Reply with a link to it and the manual.
John
I upload it is manual here: http://share.gogo.mn/J9oih67Pmz21061329113197/A3%20user%20manual.pdf
Do you know if yours shipped as RS232 with TTL level? If not, this may be the reason why it doesn’t work.
Hi John, Roger again, the solution is a firmware with 19200 enable, i have them, send me a email and i send the aplication to you, Regards.
Good on you. Email john at tronixstuff dot com
Hi John, i have try two times email you, but your email server rejects, say “Our system detected an illegal attachment on your message”
Its a zip, what to do?
Regards
Post it up on Rapidshare and reply with the URL.
Need to open account, done, but no credits, try
https://rapidshare.com/files/2375101312/701_V3.5_19200.zip
Nice work, thanks for that.
John
Hi sir, thanks so much. I can print it
Awesome!
John do you know how to print out a barcode sideways – Landscape instead of portrait
Good question – easily? – no idea. Then again, you could do it in software – but that sounds a bit painful.
cheers
John
Здравствуйте!
Вот пытаюсь заставить печатать COM-10438 русские буквы:
byte b1[] = { _тут_описание_символа_36_байт_ };
byte b2[] = { _тут_описание_символа_36_байт_ };
byte b3[] = { _тут_описание_символа_36_байт_ };
int heatTime = 80;
int heatInterval = 255;
char printDensity = 15;
char printBreakTime = 15;
void setup()
{
Serial.begin(19200);
printer.begin();
printer.print(27,BYTE);
printer.print(38,BYTE);
printer.print(3,BYTE);
printer.print(38,BYTE);
printer.print(40,BYTE);
printer.print(12,BYTE);
for( int i = 0 ; i < 36 ; i++ ) printer.print(b1[i],BYTE);
//printer.print(12,BYTE); //по аналогии с другим (SRP-350) пытался
for( int i = 0 ; i < 36 ; i++ ) printer.print(b2[i],BYTE);
//printer.print(12,BYTE); //по аналогии с другим (SRP-350) пытался
for( int i = 0 ; i < 36 ; i++ ) printer.print(b3[i],BYTE);
printer.print(27, BYTE);
printer.print(55, BYTE);
printer.print(7, BYTE);
printer.print(heatTime, BYTE);
printer.print(heatInterval, BYTE);
printer.print(18, BYTE);
printer.print(35, BYTE);
int printSetting = (printDensity<<4) | printBreakTime;
printer.print(printSetting, BYTE);
}
Результат:
Непредсказуемо может печатать все переопределенные символы или только один из них…. Подскажите плз, что я неправильно делаю