import board
import dotstar_featherwing
import time
import random

wing = dotstar_featherwing.DotstarFeatherwing(board.D13, board.D11, 0.25)

wing.clear()
wing.show()

while True:
    color = (random.randint(0,
                            255), random.randint(0,
                                                 255), random.randint(0, 255))
    wing.fill(color)
    wing.show()
    time.sleep(0.25)
    wing.clear()
    wing.show()
    time.sleep(0.25)
示例#2
0
import board
import dotstar_featherwing
import time
import random

wing = dotstar_featherwing.DotstarFeatherwing(board.D13,
                                              board.D11,
                                              brightness=0.10)

wing.clear()
wing.show()

while True:
    row = random.randint(0, 5)
    column = random.randint(0, 11)
    color = (random.randint(0,
                            255), random.randint(0,
                                                 255), random.randint(0, 255))
    wing.set_color(row, column, color)
    row = random.randint(0, 5)
    column = random.randint(0, 11)
    wing.set_color(row, column, (0, 0, 0))
    wing.show()