I'm a bloody newbee in this group and I need some advise:

I’m a bloody newbee in this group and I need some advise:

I’m trying to connect a thermal printer [1] to the ESP8266 (Wemos d1 mini[2]) via a level converter [3]. The thermal printer works fine if I connect it to an arduino but it refuses to print something with the ESP8266 (even If I change the timeoutWait function [4]).

Any hints what can go wrong? Thanks in advance :slight_smile:

[1] Arduino Code | Mini Thermal Receipt Printers | Adafruit Learning System
[2] https://www.wemos.cc/product/d1-mini.html
[3] 74AHCT125 - Quad Level-Shifter (3V to 5V) [74AHCT125] : ID 1787 : $1.50 : Adafruit Industries, Unique & fun DIY electronics and kits
[4] timeoutWait function doesn't work with ESP8266 · Issue #23 · adafruit/Adafruit-Thermal-Printer-Library · GitHub

The baudrate or maybe the pin is not configured correctly.

If you are using a UNO, it’s pins are 5 volts, the ESP8266 are 3.3 Volts. Try a level shifter.

Which level shifter are you trying? Try the 74HCT245N

@Marvin_Sielenkemper While pressing the button on the printer and powering it up, it does a test print with fw version and the corresponding baudrate. In oder words: I checked this. :wink:

The pn is devined like this:
#define TX_PIN 6

@Andrew_Miller The Level-Shifter (74AHCT125) should do that.

@Dushyant_Ahuja I use this: 74AHCT125 - Quad Level-Shifter (3V to 5V) [74AHCT125] : ID 1787 : $1.50 : Adafruit Industries, Unique & fun DIY electronics and kits

This is how I wired the components:
missing/deleted image from Google+

@enhydra Sorry, my bad. Sometimes I miss things on the small phone screen.

Now it works. I changed

#define TX_PIN 6 to
#define TX_PIN D6

That’s all. Thank you guys :slight_smile:

:+1:

Btw there was no level shifting needed. I just hooked the esp to the printer. :slight_smile:

@enhydra ​: A typical “beginner” error (I have to deal with that nasty feature of the NodeMCU every time I do ESP8266 projects). The NodeMCU D6 pin is the same as the pin 12 of any “standard” board.

If you replace D6 with 12 it will keep working. However, if you will use a NodeMCU for the final project, best use D6 to avoid confusion.