
Please confirm the position of jumper(JP5)
AS-289R2 Thermal Printer Shield Library for Arduino
/*
* Thermal Printer Shield for Arduino UNO
* Model:AS-289R2 & AS-289R
* Sample Sourcecode
* NADA ELECTRONICS, LTD.
* http://www.nada.co.jp
* By. Takehiro Yamaguchi
*/
void setup()
{
Serial.begin(9600);
}
void loop()
{
/* Text Print */
Serial.print("Thermal Printer Shield\r");
Serial.print("Text Printing.\r");
Serial.print("\r\r"); // Line Feed x 2
/* QRcode Print */
byte GsQr[] = { 0x1D,0x78,0x4C,0x04,0x54,0x45,0x53,0x54 };
Serial.write(GsQr, 8);
Serial.print("\r\r\r\r\r\r"); // Line Feed x 6
/* Wait */
delay(5000); // 5sec
}

Please confirm the position of jumper(JP5)
AS-289R2 Thermal Printer Shield Library for Arduino
/*
* Thermal Printer Shield for Genuino 101 | Arduino 101 *USA ONLY
* Model:AS-289R2 & AS-289R
* Sample Sourcecode
* NADA ELECTRONICS, LTD.
* http://www.nada.co.jp
* By. Takehiro Yamaguchi
*/
void setup()
{
Serial1.begin(9600);
}
void loop()
{
/* Text Print */
Serial1.print("Thermal Printer Shield\r");
Serial1.print("Text Printing.\r");
Serial1.print("\r\r"); // Line Feed x 2
/* QRcode Print */
byte GsQr[] = { 0x1D,0x78,0x4C,0x04,0x54,0x45,0x53,0x54 };
Serial1.write(GsQr, 8);
Serial1.print("\r\r\r\r\r\r"); // Line Feed x 6
/* Wait */
delay(5000); // 5sec
}

Please confirm the position of jumper(JP5)
Please note short circuit with LAN connector.
Yún's UART is connected to LinuxSoC, so connect with Serial 2 with SoftwareSerail.
/*
* Thermal Printer Shield for Arduino Yún
* Model:AS-289R2 & AS-289R
* Sample Sourcecode
* NADA ELECTRONICS, LTD.
* http://www.nada.co.jp
* By. Takehiro Yamaguchi
*/
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
SoftwareSerial mySerial(rxPin, txPin);
void setup()
{
pinMode(txPin, OUTPUT);
mySerial.begin(9600);
}
void loop()
{
/* Text Print */
mySerial.print("Thermal Printer Shield\r");
mySerial.print("Text Printing.\r");
mySerial.print("\r\r"); // Line Feed x 2
/* QRcode Print */
byte GsQr[] = { 0x1D,0x78,0x4C,0x04,0x54,0x45,0x53,0x54 };
mySerial.write(GsQr, 8);
mySerial.print("\r\r\r\r\r\r"); // Line Feed x 6
/* Wait */
delay(5000); // 5sec
}