更新ESP32 CGC MCP控制方式,添加一个ESP32 CGC 144的开发板 (#736)

* Update README.md

* Update config.h

增加MCP控制方式

* Update esp32_cgc_board.cc

增加MCP控制方式

* Update CMakeLists.txt

增加ESP32 CGC 144开发板

* Update Kconfig.projbuild

增加ESP32 CGC 144开发板

* Create README.md

增加ESP32 CGC 144开发板

* Add files via upload

* Update config.h

修改注释
This commit is contained in:
wdmomoxx
2025-06-03 12:20:57 +08:00
committed by GitHub
parent 32c5b3e6d4
commit 02abd71588
12 changed files with 794 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
# 主板开源地址:
[https://oshwhub.com/wdmomo/esp32-xiaozhi-kidpcb](https://oshwhub.com/wdmomo/esp32-xiaozhi-kidpcb)
- V1:[https://oshwhub.com/wdmomo/esp32-xiaozhi-kidpcb](https://oshwhub.com/wdmomo/esp32-xiaozhi-kidpcb)
- V2:[https://oshwhub.com/wdmomo/esp32-xiaozhi-kidpcb_copy](https://oshwhub.com/wdmomo/esp32-xiaozhi-kidpcb_copy)
- 更多介绍:[wdmomo.fun](https://www.wdmomo.fun:81/doc/index.html?file=001_%E8%AE%BE%E8%AE%A1%E9%A1%B9%E7%9B%AE/0001_%E5%B0%8F%E6%99%BAAI/002_ESP32-CGC%E5%BC%80%E5%8F%91%E6%9D%BF%E5%B0%8F%E6%99%BAAI)
# 编译配置命令

View File

@@ -31,6 +31,9 @@
#define BOOT_BUTTON_GPIO GPIO_NUM_0
#define ASR_BUTTON_GPIO GPIO_NUM_13
// A MCP Test: Control a lamp
#define LAMP_GPIO GPIO_NUM_12
#define DISPLAY_SDA_PIN GPIO_NUM_NC
#define DISPLAY_SCL_PIN GPIO_NUM_NC

View File

@@ -5,6 +5,8 @@
#include "application.h"
#include "button.h"
#include "config.h"
#include "mcp_server.h"
#include "lamp_controller.h"
#include "iot/thing_manager.h"
#include "led/single_led.h"
@@ -152,9 +154,14 @@ private:
// 物联网初始化,添加对 AI 可见设备
void InitializeIot() {
#if CONFIG_IOT_PROTOCOL_XIAOZHI
auto& thing_manager = iot::ThingManager::GetInstance();
thing_manager.AddThing(iot::CreateThing("Speaker"));
thing_manager.AddThing(iot::CreateThing("Screen"));
thing_manager.AddThing(iot::CreateThing("Lamp"));
#elif CONFIG_IOT_PROTOCOL_MCP
static LampController lamp(LAMP_GPIO);
#endif
}
public: