crteensy / esp01-shopping-list-printer

An ESP01 and a thermal printer hooked up to create a shopping list printer
MIT License
6 stars 0 forks source link

Use Wemos D1 mini #1

Open 3kmch opened 7 years ago

3kmch commented 7 years ago

I'm trying to get your shopping list printer to work with the D1 mini (https://www.wemos.cc/product/d1-mini.html).

In your schematic you refer to the GPIO0 and GPIO2 pins. I would like to replace them with corresponding Di mini pins (D3 and D4). No problems with GPIO0, but I can't find the GPIO2 somewhere in the sketch. Can you please point me to the right place or clarify, what I got wrong?

The server itself seems to work fine, also the printer with the adafruit library...

I'm bloody new to arduino and esp, so please have mercy. ;-)

crteensy commented 7 years ago

GPIO2 is the hardware serial port's TX output, and is connected to the printer's RX input and a pull-up resistor (see schematic here: https://hackaday.io/project/9615/gallery#43eddbf577f14f94eb0b045724ce346a). It's implicitly cofigured by the call to PrinterSerial.begin(): https://github.com/crteensy/esp01-shopping-list-printer/blob/master/sketch/sketch.ino#L83

Does it not work as intended?

3kmch commented 7 years ago

Problem solved :)

#include "SoftwareSerial.h"
#define TX_PIN D6 // Arduino transmit  YELLOW WIRE  labeled RX on printer
#define RX_PIN D5 // Arduino receive   GREEN WIRE   labeled TX on printer

Instead of

#define TX_PIN 6

I had to write

#define TX_PIN D6

Thanks anyway :)