-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathred-sym-scroll.py
executable file
·49 lines (38 loc) · 1.03 KB
/
red-sym-scroll.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import acabsl
import time
t = 1.8
acabsl.update()
def set_col(col,r,g,b,t):
for w in range(acabsl.NOOFWALLS):
for y in range(acabsl.WALLSIZEY):
acabsl.send(col,y,r,g,b,t,w)
def set_all(r,g,b,t):
for w in range(acabsl.NOOFWALLS):
for x in range(acabsl.WALLSIZEX):
for y in range(acabsl.WALLSIZEY):
acabsl.send(x,y,r,g,b,t,w)
midcol = 7
dcol = 0
#set_all(0,0,0,0.5)
#acabsl.update()
#time.sleep(0.5)
#set_col(midcol, 255, 0, 0, t)
#acabsl.update()
#time.sleep(t)
while True:
dcol = 0
while midcol+dcol < acabsl.WALLSIZEX or midcol-dcol >= 0:
set_col(midcol+dcol, 255, 0, 0, t*3)
set_col(midcol-dcol, 255, 0, 0, t*3)
acabsl.update()
time.sleep(t)
dcol+=1
dcol = 0
while midcol+dcol < acabsl.WALLSIZEX or midcol-dcol >= 0:
set_col(midcol+dcol, 0, 0, 0, t*3)
set_col(midcol-dcol, 0, 0, 0, t*3)
acabsl.update()
time.sleep(t)
dcol+=1