Created
October 16, 2022 22:43
-
-
Save thisismyrobot/5042907ec1fdabe43f3e04a499cdbf36 to your computer and use it in GitHub Desktop.
Example of talking to a EM5820 thermal printer
This file contains 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
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