a2 printer

This commit is contained in:
olikraus 2016-07-27 10:08:12 +02:00
parent 0213db2b8b
commit 0b24a8d6e4
1 changed files with 9 additions and 1 deletions

View File

@ -72,17 +72,25 @@ extern "C" uint8_t u8x8_byte_arduino_serial(u8x8_t *u8g2, uint8_t msg, uint8_t a
break; break;
case U8X8_MSG_BYTE_INIT: case U8X8_MSG_BYTE_INIT:
delay(1000);
PRINTER_SERIAL.begin(19200); PRINTER_SERIAL.begin(19200);
/* send something.... */
//PRINTER_SERIAL.begin(9600); //PRINTER_SERIAL.begin(9600);
delay(500); PRINTER_SERIAL.write(27); /* ESC */
PRINTER_SERIAL.write(64); /* @ --> reset printer */
delay(1000);
while(PRINTER_SERIAL.available() > 0) while(PRINTER_SERIAL.available() > 0)
PRINTER_SERIAL.read(); PRINTER_SERIAL.read();
delay(1000);
PRINTER_SERIAL.println("Oli");
break; break;
case U8X8_MSG_BYTE_SET_DC: case U8X8_MSG_BYTE_SET_DC:
break; break;
case U8X8_MSG_BYTE_START_TRANSFER: case U8X8_MSG_BYTE_START_TRANSFER:
PRINTER_SERIAL.begin(19200);
break; break;
case U8X8_MSG_BYTE_END_TRANSFER: case U8X8_MSG_BYTE_END_TRANSFER: