Hi I have bought a GOOJPRT QR203 here thermal printer. I tried to operate it via Adafruit-Thermal-Printer-Library but unfortunately it printed nothing except for some weird characters at first. Then I played with the sketch and finally I could get it to write some meaningfull words. My problem is that the printer doesn't print more than five characters in a single row and there are only a few words it prints accurately( like Small, Line and Taller). I am attaching the result pages . You will see there are three columns on the page, it is because I rolled the paper back to reuse it. Many thanks in advance .I simplified the sketch and it is as following;
#include "Adafruit_Thermal.h"
#include "SoftwareSerial.h"
#define TX_PIN 6 // Arduino transmit YELLOW WIRE labeled RX on printer
#define RX_PIN 5 // Arduino receive GREEN WIRE labeled TX on printer
SoftwareSerial mySerial(RX_PIN, TX_PIN); // Declare SoftwareSerial obj first
Adafruit_Thermal printer(&mySerial,4); // Pass addr to printer constructor
const int I_NUMLOOPS = 3;
int i_loopcounter;
void setup() {
pinMode(7, OUTPUT); digitalWrite(7, LOW);
mySerial.begin(9600); // Initialize SoftwareSerial
Serial.begin(9600); // Initialize SoftwareSerial
printer.begin(); // Init printer (same regardless of serial type)
}
void printonce()
{
printer.setSize('M');
printer.boldOn();
printer.justify('L');
printer.println(F("Small\nTaller\nMediu"));
printer.boldOff();
print
}
void loop() {
while (i_loopcounter < I_NUMLOOPS)
{
delay(500);
printonce();
i_loopcounter++;
if (i_loopcounter == I_NUMLOOPS)
{
printer.feed(2);
}
}
}