Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> import serial
- >>> ser = serial.Serial( '/dev/ttyUSB0', baudrate=9600 )
- >>> ser.write( b"\x1B\x37" + bytes( [ 7, 160, 4 ] ) )
- 160 means 160x10us heating time, minimum 3 means 30us, default 80 means 800us
- 4 means 40us heating interval, default 2 means 20s
- >>> ser.write( b"\x1B\x21" + bytes( [ 1 ] ) )
- 1 means condensed B font (42 chars/line), default 0 means normal A font (32 chars/line)
- >>> ser.write( b"\x1D\x56\x00" )
- Cut paper, print minimum two empty lines before.
- Empty line = space + linefeed.
Add Comment
Please, Sign In to add comment