更新sowl的固件
This commit is contained in:
Binary file not shown.
@@ -83,7 +83,7 @@ except Exception as e:
|
|||||||
print("Warning: Failed to communicate with CI1316XP (ASR) or", e)
|
print("Warning: Failed to communicate with CI1316XP (ASR) or", e)
|
||||||
|
|
||||||
'''2RGB_WS2812'''
|
'''2RGB_WS2812'''
|
||||||
onboard_rgb = NeoPixel(onboard_bot.rgb_sync, 3)
|
onboard_rgb = NeoPixel(onboard_bot.rgb_sync, 2)
|
||||||
|
|
||||||
'''1Buzzer-Music'''
|
'''1Buzzer-Music'''
|
||||||
onboard_music = MIDI(0, pa_ctrl=onboard_asr.pa_ctrl)
|
onboard_music = MIDI(0, pa_ctrl=onboard_asr.pa_ctrl)
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ Micropython library for the WS2812 NeoPixel-RGB(method inheritance)
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
class NeoPixel:
|
class NeoPixel:
|
||||||
def __init__(self, func, n, bpp=3, ORDER=(0, 1, 2, 3)):
|
def __init__(self, func, n, bpp=3, ORDER=(0, 1, 2, 3), status=(0, 10 ,0)):
|
||||||
self.func = func
|
self.func = func
|
||||||
self.bpp = bpp
|
self.bpp = bpp
|
||||||
self.rgbs = n
|
self.rgbs = n
|
||||||
self.ORDER = ORDER
|
self.ORDER = ORDER
|
||||||
self.rgb_buf = bytearray(self.rgbs * bpp)
|
self.rgb_buf = bytearray(self.rgbs * bpp) + bytes(status)
|
||||||
self.write()
|
self.write()
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user