Skip to content

Instantly share code, notes, and snippets.

@thisismyrobot
Created October 16, 2022 22:43
Show Gist options
  • Save thisismyrobot/5042907ec1fdabe43f3e04a499cdbf36 to your computer and use it in GitHub Desktop.
Save thisismyrobot/5042907ec1fdabe43f3e04a499cdbf36 to your computer and use it in GitHub Desktop.
Example of talking to a EM5820 thermal printer
import serial
def hello(port='COM5', baud=9600):
with serial.Serial(port, baud) as conn:
conn.write('Hello, World!\n\n\n')
if __name__ == '__main__':
hello()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment