Skip to content

Commit 339619c

Browse files
committed
New examples
1 parent d80dc17 commit 339619c

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

examples/dots/main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import board
2+
import dotstar_featherwing
3+
import time
4+
import random
5+
6+
wing = dotstar_featherwing.DotstarFeatherwing(board.D13, board.D11, brightness=0.10)
7+
8+
wing.clear()
9+
wing.show()
10+
11+
while True:
12+
row = random.randint(0, 5)
13+
column = random.randint(0, 11)
14+
color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
15+
wing.set_color(row, column, color)
16+
row = random.randint(0, 5)
17+
column = random.randint(0, 11)
18+
wing.set_color(row, column, (0, 0, 0))
19+
wing.show()

examples/fill/main.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import board
2+
import dotstar_featherwing
3+
import time
4+
import random
5+
6+
wing = dotstar_featherwing.DotstarFeatherwing(board.D13, board.D11, brightness=0.1)
7+
8+
wing.clear()
9+
wing.show()
10+
11+
while True:
12+
color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
13+
wing.fill(color)
14+
wing.show()
15+
time.sleep(0.25)
16+
wing.clear()
17+
wing.show()
18+
time.sleep(0.25)

0 commit comments

Comments
 (0)