Skip to content

Instantly share code, notes, and snippets.

@baptadn
Created August 6, 2023 12:00
Show Gist options
  • Select an option

  • Save baptadn/6bf02dce4777a82e76179ea4f945d5de to your computer and use it in GitHub Desktop.

Select an option

Save baptadn/6bf02dce4777a82e76179ea4f945d5de to your computer and use it in GitHub Desktop.
from escpos.printer import Serial
""" 9600 Baud, 8N1, Flow Control Enabled """
p = Serial(devfile='/dev/serial0,
baudrate=9600,
bytesize=8,
parity='N',
stopbits=1,
timeout=1.00,
dsrdtr=True)
p.text("Hello World\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment