forked from pvx/litsimaja
Add python led programs
This commit is contained in:
13
pyleds/program/siinus/Static.py
Normal file
13
pyleds/program/siinus/Static.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from lib.Program import Program
|
||||
|
||||
|
||||
def name():
|
||||
return 'Static color'
|
||||
|
||||
|
||||
class Static(Program):
|
||||
def run(self, args: [] = None) -> None:
|
||||
color_arr = args['color']
|
||||
for i in range(self._lm.count_pixels()):
|
||||
self._lm.set_pixel_color(i, (color_arr[0] << 16) | (color_arr[1] << 8) | color_arr[2])
|
||||
self._lm.show()
|
||||
Reference in New Issue
Block a user