mirror of
https://github.com/phooky/Apple-410.git
synced 2024-06-04 09:29:27 +00:00
20 lines
373 B
Python
20 lines
373 B
Python
|
#!/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")
|