8000 增加雾岸科技AUS3邮票板 by PawnMa · Pull Request #765 · 78/xiaozhi-esp32 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

增加雾岸科技AUS3邮票板 #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/v1/fogseek-aus3-v1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ elseif(CONFIG_BOARD_TYPE_OTTO_ROBOT)
set(BOARD_TYPE "otto-robot")
elseif(CONFIG_BOARD_TYPE_ELECTRON_BOT)
set(BOARD_TYPE "electron-bot")
elseif(CONFIG_BOARD_TYPE_FOGSEEK_AUS3_V1)
set(BOARD_TYPE "fogseek-aus3-v1")
elseif(CONFIG_BOARD_TYPE_BREAD_COMPACT_WIFI_CAM)
set(BOARD_TYPE "bread-compact-wifi-s3cam")
endif()
Expand Down
3 changes: 3 additions & 0 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ choice BOARD_TYPE
depends on IDF_TARGET_ESP32S3
select LV_USE_GIF
select LV_GIF_CACHE_DECODE_DATA
config BOARD_TYPE_FOGSEEK_AUS3_V1
bool "雾岸科技AUS3邮票板"
depends on IDF_TARGET_ESP32S3
endchoice

choice ESP_S3_LCD_EV_Board_Version_TYPE
Expand Down
57 changes: 57 additions & 0 deletions main/boards/fogseek-aus3-v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## 产品简介

雾岸科技AUS3邮票板是高度集成麦克风与扬声器的核心板,板载LDO供电,可以帮助AI与DIY爱好者快速开发属于自己的智能硬件。

<img src="../../../docs/v1/fogseek-aus3-v1.jpg" alt="fogseek-aus3-v1" style="zoom: 25%;" />

### 特殊引脚定义

该核心板与ESP32-S3-WROOM-1U高度兼容,使用原核心板不可使用的IO35、IO36、IO37引脚作为音频电源与扬声器输出。

| 原引脚 | 功能占用 | 备注 |
| ---------------- | ------------------- | -------------------- |
| IO35(内部 PSRAM) | VDD_AU | 模组/音频供电 |
| IO36(内部 PSRAM) | OUTP | 音频输出P |
| IO36(内部 PSRAM) | OUTN | 音频输出N |
| **已占用引脚** | | |
| IO1 | AUDIO_I2S_GPIO_DOUT | 保证天线净空区未引出 |
| IO2 | AUDIO_I2S_GPIO_DIN | 保证天线净空区未引出 |
| IO38(仍引出) | AUDIO_I2S_GPIO_WS | |
| IO39(仍引出) | AUDIO_I2S_GPIO_BCLK | |

**注意事项**

模组自带LDO,无需3V3输入,其3V3输出能力有限,建议不超过100mA。

模组MIC收音为底部收音,注意挖孔以免影响收音质量。

## TODO

由于是核心板,目前只实现了基础语音功能,应有自定义引脚与外设功能,后续预计开发灵活配置功能,兼容绝大部分外设。

## 编译配置命令

**配置编译目标为 ESP32S3:**

```bash
idf.py set-target esp32s3
```

**打开 menuconfig:**

```bash
idf.py menuconfig
```

**选择板子:**

```
Xiaozhi Assistant -> Board Type -> 雾岸科技AUS3邮票板
```

**编译:**

```bash
idf.py build
```

20 changes: 20 additions & 0 deletions main/boards/fogseek-aus3-v1/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef _BOARD_CONFIG_H_
#define _BOARD_CONFIG_H_

#include <driver/gpio.h>

#define AUDIO_INPUT_SAMPLE_RATE 16000
#define AUDIO_OUTPUT_SAMPLE_RATE 16000


#define AUDIO_I2S_GPIO_DOUT GPIO_NUM_1
#define AUDIO_I2S_GPIO_DIN GPIO_NUM_2
#define AUDIO_I2S_GPIO_WS GPIO_NUM_38
#define AUDIO_I2S_GPIO_BCLK GPIO_NUM_39

#define BOOT_BUTTON_GPIO GPIO_NUM_0

#define LAMP_GPIO GPIO_NUM_18


#endif
9 changes: 9 additions & 0 deletions main/boards/fogseek-aus3-v1/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"target": "esp32s3",
"builds": [
{
"name": "fogseek-aus3-v1",
"sdkconfig_append": []
}
]
}
58 changes: 58 additions & 0 deletions main/boards/fogseek-aus3-v1/fogseek-aus3-v1.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#include "wifi_board.h"
#include "audio_codecs/no_audio_codec.h"
#include "system_reset.h"
#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"
#include "assets/lang_config.h"

#include <wifi_station.h>
#include <esp_log.h>


#define TAG "FogSeekAus3V1"

class FogSeekAus3V1 : public WifiBoard {
private:
Button boot_button_;

void InitializeButtons() {
boot_button_.OnClick([this]() {
auto& app = Application::GetInstance();
if (app.GetDeviceState() == kDeviceStateStarting && !WifiStation::GetInstance().IsConnected()) {
ResetWifiConfiguration();
}
app.ToggleChatState();
});
}

// 物联网初始化,逐步迁移到 MCP 协议
void InitializeIot() {
#if CONFIG_IOT_PROTOCOL_XIAOZHI
auto& thing_manager = iot::ThingManager::GetInstance();
thing_manager.AddThing(iot::CreateThing("Speaker"));
thing_manager.AddThing(iot::CreateThing("Lamp"));
#elif CONFIG_IOT_PROTOCOL_MCP
static LampController lamp(LAMP_GPIO);
#endif
}

public:
FogSeekAus3V1() :
boot_button_(BOOT_BUTTON_GPIO) {
InitializeButtons();
InitializeIot();
}

virtual AudioCodec* GetAudioCodec() override {
static NoAudioCodecDuplex audio_codec(AUDIO_INPUT_SAMPLE_RATE, AUDIO_OUTPUT_SAMPLE_RATE,
AUDIO_I2S_GPIO_BCLK, AUDIO_I2S_GPIO_WS, AUDIO_I2S_GPIO_DOUT, AUDIO_I2S_GPIO_DIN);
return &audio_codec;
}
};

DECLARE_BOARD(FogSeekAus3V1);
0