[i=s] 本帖最后由 WT_0213 于 2025-8-18 18:08 编辑 [/i]
【教程】小安派BW21-CBV-Kit——从 SD 卡播放 MP3
原文,发现跑这个Demo,没有声音,开始觉得是代码的问题后来检查了一下,也没发现什么,就想着看看电路。
开源地址:
https://oshwhub.com/ai-thiner_openteam/bw21-cbv-kit
可以看到PCB图上AOUT引脚与BW21模块中间有一个元器件。

名称:C_2
位号: C21

然后继续看电路图,Control+F 搜索 C21

可以看到C21是个电容。具体值没有找到。并且手上只有0603的10uf电容,直接就焊上了。焊盘是0402的。不太影响焊接。
声音已经可以出来了,但是非常小,修改代码调整一下音量。
file.setMp3DigitalVol(0xFF); // 这里将声音设置为0xFF
/* This example decodes an MP3 file from an SD card
and plays audio through a TRRS 3.5mm audio jack module.
Example guide: https://ameba-doc-arduino-sdk.readthedocs-hosted.com/en/latest/ameba_pro2/amb82-mini/Example_Guides/Multimedia/Play%20MP3%20with%20SD%20card.html
*/
#include "AmebaFatFS.h"
#define INTERVAL 1000
AmebaFatFS fs;
String filename = "Audio_test.mp3";
void setup()
{
Serial.begin(115200);
fs.begin();
File file = fs.open(String(fs.getRootPath()) + filename, MP3);
file.setMp3DigitalVol(0xFF); // 这里将声音设置为0xFF
file.playMp3();
file.close();
}
void loop()
{
delay(INTERVAL);
}