Apple-410/test_scripts/10print.py
2017-12-08 13:45:41 -05:00

20 lines
373 B
Python
Executable File

#!/usr/bin/python3
import apple410
import random
import math
lineht=100
# 2394 x 1700
w=2394
h=1700
a = apple410.Apple410('/dev/ttyUSB0')
a.send("LS{}".format(lineht))
ydim = math.floor(h/lineht)
xdim = math.floor(w/lineht)
for y in range(ydim):
a.send("MA0,{}".format(lineht*y))
a.send("PL"+''.join(map(lambda _:random.choice('\\/'),range(xdim))))
a.send("CH")