Created
May 27, 2021 00:11
-
-
Save jordanhudgens/bf79e40681cc1bf4447dd5ebec588508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "socket" | |
require "escpos" | |
port = 9100 | |
printer = Escpos::Printer.new | |
printer << "Testing from #{port}" | |
ip = "68.0.171.246" | |
socket = TCPSocket.new ip, port | |
socket.write printer.to_escpos | |
socket.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment