# a2_printer **Repository Path**: rubygems/a2_printer ## Basic Information - **Project Name**: a2_printer - **Description**: No description available - **Primary Language**: Ruby - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-10-14 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README A2 Printer ========== A small library for working with cheap thermal "A2" printers, such as those available from Adafruit and Sparkfun. Simple example ------ serial_connection = SerialConnection.new("/dev/serial") printer = A2Printer.new(serial_connection) printer.begin printer.println("Hello world!") printer.feed printer.bold_on printer.println("BOOM!") printer.bold_off Writing to a file -------- This can be useful if you're going to use some other mechanism to send the bytes to the printer commands_file = File.open("serial_commands.data", "w") printer = A2Printer.new(commands_file) printer.begin printer.println("Hello world!") # etc ... commands_file.close