diff --git a/images/final.png b/images/final.png new file mode 100644 index 0000000..a038ea1 Binary files /dev/null and b/images/final.png differ diff --git a/script.py b/script.py index d1d91f6..b925f07 100644 --- a/script.py +++ b/script.py @@ -3,13 +3,13 @@ import glob import random from escpos.printer import Usb -p = Usb(0x4b8, 0x0e15) +p = Usb(0x4b8, 0x0e03) new_image = Image.new('RGBA',(288*2, 288*19), (255,255,255)) -for uu in range(0,10): - images = glob.glob("./*.png",recursive=False) +for uu in range(0,1): + images = glob.glob("images/*.png",recursive=False) random.shuffle(images) print(images) while images: diff --git a/test.py b/test.py new file mode 100644 index 0000000..b7d96e9 --- /dev/null +++ b/test.py @@ -0,0 +1,19 @@ +from PIL import Image +from escpos.printer import Usb + +p = Usb(0x4b8, 0x0e03) #in_ep=0x82, out_ep=0x01) + +p.textln("hello world") + +p.text("hello ") + +p.text("line!") + +p.qr("https://chae0.org", size=16, center=True) +#always put p.ln() before printing an image like, p.image("") + +p.ln() + +p.image("images/final.png") + +p.cut()