Introducing the SerialPort Mini Thermal Printer gem

require 'serialport_mtp'

sp = SerialPortMTP.new

sp.start
sp.println("Hello world!")
sp.feed

The above code was tested running on a mini thermal printer (similar to the Adafruit mini thermal printer) connected to a Raspberry Pi.

Note: Credit for the original code goes to James Adam.[rubygems.org]

Resources