How do you install ofxESCPOS within the openFrameworks

I got OF installed and working on my RPI 2 following the instructions provided. I also wanted to install ofxESCPOS to test a thermal printer. I saw the ofxESCPOS app but I’m not sure where it belongs within the OF framework. Are there instructions for its installation (along with its dependencies)?


Each addon goes in the “addons/” directory (in the openFrameworks root directory).

To install addons, you can usually look at the original addon’s addon_config.make file (e.g. to see what dependencies it has. In this case, it requires ofxIO and ofxSerial. You can clone the addons into your addons directory using git, or you can download the latest release. If you download the addon, make sure that it unzips into the correct folder name (sometimes it will unzip into something like ofxIO-master) so the build system recognizes it.

Once you have the dependencies installed you should be able to go into one of the examples and run make.

Currently I use ofxESCPOS on a raspberry pi for lots of installations, so once you have the dependencies installed, it should work nicely.

Keep us posted!

I got everything loaded. I was able to compile the ofxIO and ofxSerial examples without any problems. With ofxESCPOS example, I’m getting a complication error:

src/ofApp.cpp:39:24: error: ‘SerialDevice’ has not been declared
src/ofApp.cpp:40:24: error: ‘SerialDevice’ has not been declared
src/ofApp.cpp:41:24: error: ‘SerialDevice’ has not been declared
src/ofApp.cpp:42:24: error: ‘SerialDevice’ has not been declared


Yes actually … I think the master branch was between versions and was missing an IO:: on each of those lines. I just updated it on the master branch:

I got everything compiled and change the path to the usb port the printer is connected to (/dev/usb/lp0). It throws an exception in printer.setup so I wanted to start some debugging. To both learn and fix the problem. I expected there to be some issues with the usb. I figured that once I get the usb connection established properly everything would work.

Did you get it working with straight usb printers?


I currently only have it working with serial printers that understand ESCPOS over serial. I use USB to Serial adapters (e.g. cheap PL2303-based adapters). If there is a way to configure your printer to use a raw serial connection over USB, then it should work …

if the printer is install correctly on your OS
you can use terminal lines
something like

system("lp /home/smile/your_file.png");

no need any addons
hope it helps