I'm using Arduino Mega for using thermal print.
I've tried using software serial and hardware serial and using Adafruit_thermal libraries and Pos_Printer libraries, those combination still printing unwanted characters, even when using printer.begin(); its still print unwanted characters, pls help
Your topic was MOVED to its current forum category as it is more suitable than the original
Please post a sketch that illustrates the problem, using code tags when you do
#include "Pos_Printer.h"
#include "hal9klogo.h"
Pos_Printer printer(&Serial1);
void setup() {
Serial1.begin(9600); // Initialize SoftwareSerial
printer.begin(); // Init printer (same regardless of serial type)
// Print the 500x85 pixel logo in Hal9klogo.h:
printer.printBitmap(Hal9klogo_width, Hal9klogo_height, Hal9klogo_data);
printer.feed();
}
void loop() {
}
this is using Pos_printer, with this library the printer always prints "8" everytime it about to print, even when I'm only using
printer.begin();
the Adafruit_Thermal isn't much better either, it prints a character before the things I tell it to print
I don't know the library but I found this in the source on github:
// *** EDIT THIS NUMBER *** Printer firmware version is shown on test
// page (hold feed button when connecting power). Number used here is
// integerized, e.g. 268 = 2.68 firmware.
#define PRINTER_FIRMWARE 629 //268
If this does not match your printer then certain control sequences could be interpreted as printable characters.
1 Like
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.