1

I want to attach my GOOJPRT Thermal Printer (I believe model QR701, communication RS232) to my ESP32 but I cannot seem to get them working.

I tried all the Adafruit Thermal Printer library examples but get the same error each and every time:

"Error compiling for board ESP32 Dev Module." 

I guess the libraries are not meant for the ESP32. I also tried the "Thermal Printer Library" by Larry Bank (which should be compatible with the ESP32 according to its github docs) but there I cannot figure out how to connect the wires of thermal printer to the ESP32 correctly.

Of course, I do not ask for a specific solution, I am just looking for someone to point me in the right direction!

enter image description here

This is an image of the exact thermal printer I have

Full error message from Adafruit Thermal Printer examples:

C:\Users\Thomas\Documents\Arduino\libraries\SoftwareSerial-master\SoftwareSerial.cpp:41:27: fatal error: avr/interrupt.h: No such file or directory
compilation terminated.
Multiple libraries were found for "Adafruit_Thermal.h"
 Used: C:\Users\Thomas\Documents\Arduino\libraries\Adafruit_Thermal_Printer_Library
 Not used: C:\Users\Thomas\Documents\Arduino\libraries\Adafruit-Thermal-Printer-Library-master
Multiple libraries were found for "SoftwareSerial.h"
 Used: C:\Users\Thomas\Documents\Arduino\libraries\SoftwareSerial-master
 Not used: C:\Users\Thomas\Documents\Arduino\libraries\EspSoftwareSerial
exit status 1
Error compiling for board ESP32 Dev Module

Second error message from Adafruit Thermal Printer example after removing the manually installed SoftwareSerial.h:

A_printertest:21:28: fatal error: SoftwareSerial.h: No such file or directory
Multiple libraries were found for "Adafruit_Thermal.h"
compilation terminated.
 Used: C:\Users\Thomas\Documents\Arduino\libraries\Adafruit_Thermal_Printer_Library
 Not used: C:\Users\Thomas\Documents\Arduino\libraries\Adafruit-Thermal-Printer-Library-master
exit status 1
SoftwareSerial.h: No such file or directory
9
  • 1
    What is the error you are actually getting? The message you pasted us is the one telling you that an error occurred, not what the error was. Without the actual error we can't help you. – Majenko Jan 14 at 11:15
  • @Majenko♦ Please see the full error message above, which I copy pasted from the Arduino IDE – Thomas Jan 14 at 13:22
  • It looks like you have installed some other SoftwareSerial library manually. You should never ever need to do that since almost all cores bundle their own version that is specific to the core. Delete it. You don't want it. Ever. – Majenko Jan 14 at 13:37
  • @Majenko♦ Thanks for the info! I manually installed the SoftwreSerial because the IDE was giving the error "No such file or directory" error. It also gives me this error after I deleted the library which I installed manually. – Thomas Jan 14 at 14:36
  • 1
    @Majenko I posted the other message on the bottom again. I am a tiny step further now, I managed to get output from my thermal printer through the Serial2 port on my ESP32 (tx/rx on pin16/17). Unfortunately the output is all gibberish but consistent (baudrate is correct). I posted a topic here on the Adafruit forum: forums.adafruit.com/viewtopic.php?f=22&t=174116 – Thomas Jan 14 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.