Em5820 not receiving commands

My thermal printer cant seem to receive commands Here is the code #include <SoftwareSerial.h> SoftwareSerial Printer(5, 6); // RX, TX void setup() { delay(2000); Printer.begin(9600); Printer.write(27); // ESC Printer.write(64); // @ initialize delay(100); Printer.println("Hello Printer!"); } void loop() {} Here are connections Arduino Pin 6 - Printer RX Arduino Pin 5 - Printer TX Arduino GND - Printer GND Printer VCC 9V - positive from external supply External 9V negative - Arduino GND & Printer GND
No description
No description
20 Replies
Kaito
Kaito4d ago
Can you show the connections on the Arduino?
DarwinWasWrong
TTL is not shown on printout. Link to printer info ?
DarwinWasWrong
Tryu it with that setup and code/library
Ashuremu
AshuremuOP4d ago
Vcc connected to 9v 2a power Same ground arduino and printer Printer rx to pin 5 tx Printer led is on
No description
Kaito
Kaito4d ago
Did you hook up tx to tx and Rx to rx? Your code is a bit unclear
Ashuremu
AshuremuOP3d ago
tx is pin 5
Kaito
Kaito3d ago
The correct connections are rx to tx. Make sure they are correct
Ashuremu
AshuremuOP3d ago
yes they are correct
Kaito
Kaito3d ago
Do you need to use inverse logic with that printer? It's an option with softwareserial
DarwinWasWrong
@Ashuremu did you bother to try the working setup and library?
Ashuremu
AshuremuOP3d ago
Yes i tried adafruit still the same Is it a hardware issue?
DarwinWasWrong
The printout shows rs232 and usb Are you sure it has ttl ? Work with USB ?
Ashuremu
AshuremuOP3d ago
i cant try with usb cuz it didnt came with a cable
DarwinWasWrong
Uses a mini b usb. @Ashuremu no store nearby ?
Ashuremu
AshuremuOP3d ago
stores nearby dont sell those any more
AnonEngineering
is the EM5820 like the one on the Adafruit page?
No description
Ashuremu
AshuremuOP3d ago
theyre similar
AnonEngineering
just wondering about the "not power here" caution
Ashuremu
AshuremuOP3d ago
i also tried that

Did you find this page helpful?