自强增加MIC音量方法
This commit is contained in:
@@ -169,6 +169,14 @@ class LED:
|
|||||||
|
|
||||||
onboard_led = LED(pins=[45, 46])
|
onboard_led = LED(pins=[45, 46])
|
||||||
|
|
||||||
|
class Voice_Energy:
|
||||||
|
def read(self):
|
||||||
|
_dat = onboard_asr._rreg(0x08, 3) #在语音识别里获取
|
||||||
|
print("-----",_dat)
|
||||||
|
return (_dat[0] | _dat[1] << 8) // 10
|
||||||
|
|
||||||
|
onboard_sound = Voice_Energy()
|
||||||
|
|
||||||
class Clock:
|
class Clock:
|
||||||
def __init__(self, x, y, radius, color, oled=onboard_tft): #定义时钟中心点和半径
|
def __init__(self, x, y, radius, color, oled=onboard_tft): #定义时钟中心点和半径
|
||||||
self.display = oled
|
self.display = oled
|
||||||
|
|||||||
Reference in New Issue
Block a user