Commit f9cc07c5 authored by Christian Wander's avatar Christian Wander
Browse files

pull pixelstuff into module

parent 7c2f1c4b
def pretty_print(thing, w, h):
n = 0
for i in thing:
n += 1
print(i, end='')
if n == w * 3:
print()
n = 0
# wtf
def heart(color):
o = (0, 0, 0)
x = color
return o + x + x + x + x + o + o + x + x + x + x + o + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
o + x + x + x + x + x + x + x + x + x + x + o + \
o + x + x + x + x + x + x + x + x + x + x + o + \
o + o + x + x + x + x + x + x + x + x + o + o + \
o + o + o + x + x + x + x + x + x + o + o + o + \
o + o + o + o + x + x + x + x + o + o + o + o + \
o + o + o + o + o + x + x + o + o + o + o + o
def eck(color):
o = (0, 0, 0)
x = color
return x + o + o + o + o + o + o + o + o + o + o + o + \
x + x + o + o + o + o + o + o + o + o + o + o + \
x + x + x + o + o + o + o + o + o + o + o + o + \
x + x + x + x + o + o + o + o + o + o + o + o + \
x + x + x + x + x + o + o + o + o + o + o + o + \
x + x + x + x + x + x + o + o + o + o + o + o + \
x + x + x + x + x + x + x + o + o + o + o + o + \
x + x + x + x + x + x + x + x + o + o + o + o + \
x + x + x + x + x + x + x + x + x + o + o + o + \
x + x + x + x + x + x + x + x + x + x + o + o + \
x + x + x + x + x + x + x + x + x + x + x + o + \
x + x + x + x + x + x + x + x + x + x + x + x
if __name__ == "__main__":
print(">> blinktest")
# print(f'eck: \n{eck((3, 3, 3))}')
# print(f'heart: \n{heart((3, 3, 3))}')
# print(desnake((1, 2, 3)))
pretty_print(heart((1, 2, 3)), 12, 12)
\ No newline at end of file
......@@ -2,6 +2,8 @@ import sacn
import time
import json
from blink import eck, heart
count = 144
pink = (255, 0, 255)
lightblue = (0, 255, 255)
......@@ -44,43 +46,6 @@ def main():
## stopping the sender?!
sender.stop()
def heart(color):
o = (0, 0, 0)
x = color
return o + x + x + x + x + o + o + x + x + x + x + o + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
x + x + x + x + x + x + x + x + x + x + x + x + \
o + x + x + x + x + x + x + x + x + x + x + o + \
o + x + x + x + x + x + x + x + x + x + x + o + \
o + o + x + x + x + x + x + x + x + x + o + o + \
o + o + o + x + x + x + x + x + x + o + o + o + \
o + o + o + o + x + x + x + x + o + o + o + o + \
o + o + o + o + o + x + x + o + o + o + o + o
def eck(color):
o = (0, 0, 0)
x = color
return x + o + o + o + o + o + o + o + o + o + o + o + \
x + x + o + o + o + o + o + o + o + o + o + o + \
x + x + x + o + o + o + o + o + o + o + o + o + \
x + x + x + x + o + o + o + o + o + o + o + o + \
x + x + x + x + x + o + o + o + o + o + o + o + \
x + x + x + x + x + x + o + o + o + o + o + o + \
x + x + x + x + x + x + x + o + o + o + o + o + \
x + x + x + x + x + x + x + x + o + o + o + o + \
x + x + x + x + x + x + x + x + x + o + o + o + \
x + x + x + x + x + x + x + x + x + x + o + o + \
x + x + x + x + x + x + x + x + x + x + x + o + \
x + x + x + x + x + x + x + x + x + x + x + x
def gimme(color):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment