add iot speaker for boards

This commit is contained in:
Terrence
2024-12-07 06:19:59 +08:00
parent d31901e9e5
commit 051a0ba483
6 changed files with 58 additions and 14 deletions

View File

@@ -5,6 +5,7 @@
#include "button.h"
#include "led.h"
#include "config.h"
#include "iot/thing_manager.h"
#include <esp_log.h>
#include <driver/i2c_master.h>
@@ -39,10 +40,17 @@ private:
});
}
// 物联网初始化,添加对 AI 可见设备
void InitializeIot() {
auto& thing_manager = iot::ThingManager::GetInstance();
thing_manager.AddThing(iot::CreateThing("Speaker"));
}
public:
EspBox3Board() : boot_button_(BOOT_BUTTON_GPIO) {
InitializeI2c();
InitializeButtons();
InitializeIot();
}
virtual Led* GetBuiltinLed() override {