This commit is contained in:
Aeris 2018-09-24 21:09:04 +02:00
parent 937733d50e
commit d542f1249e

33
apps/strobo.py Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env python3
import os
import sys
Nx = int(sys.argv[1])
Ny = int(sys.argv[2])
param = 10
try:
param = int(sys.argv[3])
except:
pass
a = True
counter = 0
buffera = bytearray(b"\x00" * (3 * Nx * Ny))
bufferb = bytearray(b"\xFF" * (3 * Nx * Ny))
while True:
if a:
os.write(1, buffera)
else:
os.write(1, bufferb)
if param == counter:
a = not a
counter = 0
counter+=1