Shivanand Gowda
/
EPSON_Printer
TM-T82II EPSON Thermal Printer. RS232 Interface Nucleo
main.cpp
- Committer:
- shivanandgowdakr
- Date:
- 2018-07-09
- Revision:
- 0:4fda2fda81e3
File content as of revision 0:4fda2fda81e3:
#include "mbed.h" #include "EPSON.h" Serial pc(USBTX, USBRX); EPSON tp(D1,D0); // tx, 9600bps int main() { tp.initialize(); tp.putLineFeed(2); tp.printf("**EPSON Thermal Printer **\r\r"); tp.setDoubleSizeWidth(); tp.printf("ABCDEFG 0123456789\r"); tp.clearDoubleSizeWidth(); tp.setDoubleSizeHeight(); tp.printf("ABCDEFG 0123456789\r"); tp.clearDoubleSizeHeight(); tp.PrintBarCode("1234567890123456",16); pc.printf("EPSON Thermal Printer\n\n"); while(1) { if (pc.readable()) { int c = pc.getc(); pc.putc(c); tp.putc(c); } } }