A Library to control an Epson TM-T88II thermal printer (microprinter) by an arduino via serial connection.
To get Arduino work together with the thermal priner on RS232 (serial) you need a level shifter. From Maxim you can get MAX2XX chips for 5 Volt and MAX32XX for 3.3 volt powered arduinos. The library works with SoftSerial so you are still able to send Data to Arduino with the standard serial line. The SoftSerial works at 9600 baud.
- Epson TM-T88II Model M129B (Serial RS232) & Arduino Uno & Maxim MAX233CPP
The functions available in this class are:
Constructor that initializes the rxPin
and txPin
used to communicate with the printer and calls the start()
function.
Sets up the communication pins, initializes the SoftwareSerial
object used for communication with the printer, and sets the baud rate to 9600.
Sends a query to the printer to check its status. Returns 22
if the printer is online.
Reads a single byte of data from the printer.
Prints the data in the print buffer and feeds n
lines of paper.
Equivalent to calling feed(1)
.
Sets the line spacing to n/180
inch.
Sets the line spacing to 1/6
inch, which is equivalent to 30 dots.
Selects an international character set based on the value of n
. See reference for more metails.
Example:
0 = U.S.A.
1 = France
2 = Germany
3 = U.K.
4 = Denmark I
5 = Sweden
6 = Italy
7 = Spain
8 = Japan
9 = Norway
10 = Denmark II
Enables double-height text printing.
Disables double-height text printing.
Enables bold text printing.
Disables bold text printing.
Enables underlined text printing.
Disables underlined text printing.
Enables white/black reverse printing mode.
Disables white/black reverse printing mode.
Sets text justification to left.
Sets text justification to center.
Sets text justification to right.
Sets the height of barcodes to n
dots. Range 1-255.
Sets the width of barcodes to n
dots. Range 2-6
Sets the position of the barcode number. Range 0-3
Prints a barcode of type m
(range 65-73) with a digit length of n
.
Performs a full cut of the paper.
Writes a single byte of data to the printer.
- Tom Taylor · Post Microprinter
- Tom Taylor · Code for the microprinter project
- Roo Reynolds · Post Microprinter
- Roo Reynolds · Microprinter Arduino library, Java and Ruby API
- Adafruit · Mini Thermal Receipt Printers
- Adafruit · Thermal Printer Library
Contributions appreciated.
You may use this work under the terms of either the MIT License or the GNU General Public License (GPL) Version 3
- 2023-03-02 - Add a documentation of the class to the readme.md
- 2014-11-24 - include functionality for reading printer status, printing barcodes and justification
- 2012-04-13 - first public release
- 2012-03-13 - first beta of the class extracted for standalone
- 2010-06-05 – first public lecture with the code («Der Tag der Schrift»)
thermal, micro, receipt, printer, serial, tm-t88, tm88, tmt88, epson