added other random scripts and functions
This commit is contained in:
parent
ef148dbbb6
commit
3f1207a5cd
8 changed files with 1929 additions and 11 deletions
42
dots2.py
Normal file
42
dots2.py
Normal file
|
@ -0,0 +1,42 @@
|
|||
# This Project is intended for the fluepdots from flipdot e.V.
|
||||
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from fluepdot import Fluepdot, Mode
|
||||
from images import propagate_wave
|
||||
|
||||
|
||||
def main(fd):
|
||||
fd.set_mode(Mode.DIFFERENTIAL)
|
||||
x, y = fd.get_size()
|
||||
print(f'{x=}, {y=}')
|
||||
print(fd.get_fonts())
|
||||
propagate_wave(fd)
|
||||
clear(fd)
|
||||
|
||||
|
||||
def interleave(func1, func2):
|
||||
for i in func1:
|
||||
for j in func2:
|
||||
for y in range(len(i)):
|
||||
for x in range(len(i[y])):
|
||||
i = not i if j[y][x] else i
|
||||
yield i
|
||||
|
||||
|
||||
def invert(arr):
|
||||
return [[not i for i in j] for j in arr]
|
||||
|
||||
|
||||
def clear(fd):
|
||||
x, y = fd.get_size()
|
||||
arr = [[False for _ in range(x)] for _ in range(y)]
|
||||
fd.post_frame(arr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
load_dotenv()
|
||||
fluepdot = Fluepdot(os.getenv('DOTS_HOST'))
|
||||
clear(fluepdot)
|
||||
main(fluepdot)
|
Loading…
Add table
Add a link
Reference in a new issue