No commit activity in last 3 years
No release in over 3 years
This Humble RPi plugin controls the mini thermal printer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.0, ~> 0.1
>= 0.1.1, ~> 0.1
 Project Readme

Printing bold text HTML tags in the HumbleRPi-plugin-mtp gem

require 'humble_rpi-plugin-mtp'

mtp = HumbleRPiPluginMTP.new
mtp.start
mtp.on_printer_message '<p>this is a test of the <b>bold</b> text</p>'

Notes:

  • The impact of the bold text is relatively light compared to what you may be used to.
  • The message must start with opening angle bracket to enable the printing of an HTML string, otherwise regular text is printed.

Introducing the Humble RPi Plugin Mini Thermal Printer gem

require 'humble_rpi-plugin-mtp'

mtp = HumbleRPiPluginMTP.new
mtp.start
mtp.on_printer_message 'The weather today is 17 degrees and cloudy'

The above code is for testing purposes only. This gem is designed to be used as a plugin with the HumbleRPi gem. The sub topic printer is used to subscribe to the topic relative to the name associated with the Raspberry Pi. If the Pi was called 'Aida', the full topic to be subscribed to would be 'HumbleRPi/root/aida/printer'. Which in this example would make the fully qualified Simple Pub Sub message appears as follows:

HumbleRPi/root/aida/printer: The weather today is 17 degrees and cloudy

Which would send to the printer the datetime stamp followed by the message e.g.

2015-08-27 21:46:56 +0000
The weather today is 17 degrees and cloudy



Resources

humblerpi plugin mtp thermalprinter