|
|
@@ -55,6 +55,7 @@ private:
|
|
|
i2c_master_bus_handle_t codec_i2c_bus_;
|
|
|
Button boot_button_;
|
|
|
Button asr_button_;
|
|
|
+ Button asr_tian_wen_button_;
|
|
|
Display* display_;
|
|
|
|
|
|
void InitializeCodecI2c() {
|
|
|
@@ -135,6 +136,11 @@ private:
|
|
|
std::string wake_word="你好小智";
|
|
|
Application::GetInstance().WakeWordInvoke(wake_word);
|
|
|
});
|
|
|
+
|
|
|
+ asr_tian_wen_button_.OnPressUp([this]() {
|
|
|
+ std::string wake_word="你好小智";
|
|
|
+ Application::GetInstance().WakeWordInvoke(wake_word);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 物联网初始化,添加对 AI 可见设备
|
|
|
@@ -146,7 +152,8 @@ private:
|
|
|
|
|
|
public:
|
|
|
MovecallMojiESP32S3() : boot_button_(BOOT_BUTTON_GPIO),
|
|
|
- asr_button_(ASR_BUTTON_GPIO){
|
|
|
+ asr_button_(ASR_BUTTON_GPIO),
|
|
|
+ asr_tian_wen_button_(ASR_TIAN_WEN_BUTTON_GPIO) {
|
|
|
InitializeCodecI2c();
|
|
|
InitializeSpi();
|
|
|
InitializeGc9a01Display();
|