A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By btidey
#85185 The link describing the print server does not need the use of another computer. The esp8266 acts a server receiving print data over wifi and then driving the printer directly. This is an Arduino project to produce firmware for the esp8266.

As configured it expects there to be a separate wifi router access point that it links to and the clients also use to then access the esp8266 print functionality. If you want to do it without a router then it would be fairly straightforward to change it so the esp8266 ran the AP itself and the clients would then connect their wifi direct to the esp8266.

Also the software is set up to support IPP (Internet printing protocol). This should make it easy to print from tablets, phones etc.

The printer does come with different interface option cards. These look like they are converting from standard interfaces (centronics, serial, usb) to some internal interface which is probably some form of parallel interface. The centronics one is do-able as the link shows, but if you had access to alternate plug in cards that supported a serial connection, then that might make it a bit easier from a hardware viewpoint.
User avatar
By christophe195
#85192 ok, if i can not make it work with json i can do it with that library.

I have try to use https://forum.arduino.cc/index.php?topic=74776.0 with a arduino nano and it works.
4 problems:

1. A nodemcu has 8 data pins, i need 10 (never use a shift register)
2. I don't know how to change the font size
3. i want to use the build in cutter
4. if possible print a bitmap on top of the bill.


Sorry i'm a leek, i can somme arduino/esp but it's limited. Thanks for your assistent.
User avatar
By btidey
#85196 Whether you use json or not you still have to make the hardware connection to the centronics interface.

1) The code allows you to use the Direct parallel interface avoiding the need for the shift register. The NodeMCU actually has 9 standard GPIO lines, but you can also configure the uart TXD0 and RXD0 as GPIO as well giving a total of 11 available. By using the RXD0 as the 10th one you can still do Serial debug if needed. On the NodeMCU the TXDO and RXDO lines are connected to the onboard USB serial for code upload and debug but it is via resistors so the esp8266 GPIO can still be used as outputs as they can override the onboard interface. You can still upload code serially from as normal but best to disconnect printer interface when you do that. Also if you include OTA software update in the code then you only need to serially upload once anyway as further updates are done over wifi.

2,3,4 are probably handled by sending special codes or sequences to the printer like ESC codes. You need to get the programming manual for the printer which I think is available on-line.
User avatar
By christophe195
#85210 Ok, thanks.

Can i replace a 5V arduino with a 3.3V esp8266?

I have remove the interface of the card and solder wire on the pins and connected them to a arduino (for testing). I have found a pdf (https://www.starmicronics.com/support/Mannualfolder/escpos_cm_en.pdf) and can print text, align them, change size and use use the cutter.

The only thing that is not working is the image. On page 83 ther is information about "Define NV bit image", but i don't understand the last part and also not how i can upload them with the arduino.

For now i use https://pastebin.com/YfYAduYb as code, "uploadBitmap();" is where i try to upload the image. Can you help me with this last problem?

Realy thanks for your time.