Hi All, I am very new to Arduino, so please forgive my ignorance but will hopefully be learning all the way.
I got a box of unfinished projects and am trying to complete the following one;
Print from an Arduino Uno to an Epson T82 printer, so far I have the MAX232N board working and the printer serial port wired up. I am using a project library (thermalprinter/thermalprinter.h at main · signalwerk/thermalprinter · GitHub) to print to the printer. All appears relatively simple but when I print I get random question marks.
Please if you have any ideas I would love the assistance..
#include <thermalprinter.h>
#include <SoftwareSerial.h>
#define ledPin 13
#define rxPin 3
#define txPin 2
Epson TM88 = Epson(rxPin, txPin); // init the Printer with Output-Pin
void setup()
{
Serial.begin(9600); //open the USB connection too
Serial.write(0x1B); //ESC POS command
Serial.print('@');
digitalWrite(ledPin, HIGH);
delay(2000);
TM88.start();
TM88.print('@');
TM88.println("............");
TM88.println("Feed 3 start");
TM88.feed(3);
TM88.println("Feed 3 end");
TM88.feed(2);
TM88.lineSpacing(30);
TM88.println("line spacing 30 start");
TM88.println("line spacing 30 end");
TM88.feed(2);
TM88.println("Hello World end");
TM88.cut();
}
void loop() // run over and over again
{
if (Serial.available() > 0) {
TM88.print(Serial.read());
}
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}