You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
420 B
14 lines
420 B
from lib.Program import Program |
|
|
|
def name(): |
|
return '2-color strips' |
|
|
|
class Strips(Program): |
|
def run(self, args = None) -> None: |
|
for i in range(self._lm.count_pixels()): |
|
if i // 5 % 2: |
|
color = (255, 255, 255) |
|
else: |
|
color = args['color'] |
|
self._lm.set_pixel_color(i, (color[0] << 16) | (color[1] << 8) | color[2]) |
|
self._lm.show()
|
|
|