You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing "BluetoothSerial.h" library in a project containing ESP32-AudioI2S, even if there is no instantiation of Bluetooth serial port, it will cause esp32 can not play audio normally, the program is set in the setup function after selecting the sd card file, play in the loop. The phenomenon is that after restarting the esp32, the audio will play normally for less than a second, then start to stall, and finally stop playing. Or don't play the audio in the first place
When importing "BluetoothSerial.h" library in a project containing ESP32-AudioI2S, even if there is no instantiation of Bluetooth serial port, it will cause esp32 can not play audio normally, the program is set in the setup function after selecting the sd card file, play in the loop. The phenomenon is that after restarting the esp32, the audio will play normally for less than a second, then start to stall, and finally stop playing. Or don't play the audio in the first place
Here's my code:
#include "Audio.h"
#include <SPI.h>
#include "SD.h"
#include "FS.h"
#include "BluetoothSerial.h"
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#define SCL 22
#define SDA 21
//TF卡
#define SD_CS 15
#define SPI_MOSI 13
#define SPI_MISO 16
#define SPI_SCK 14
//喇叭
#define I2S_DOUT 25
#define I2S_BCLK 27
#define I2S_LRC 26
//按键
#define BUTTON 17
#define BT_LED 18
//ws2812
#define WS 19
//数据记录
#define GESTURE_NUM 16
#define Kbps 705
Audio audio;
void setup() {
Serial.begin(115200);
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable detector
pinMode(BUTTON,INPUT_PULLUP);
pinMode(BT_LED,OUTPUT);
pinMode(SD_CS, OUTPUT);
digitalWrite(BT_LED,0);
Serial.begin(115200);
digitalWrite(SD_CS, LOW);
delay(10);
digitalWrite(SD_CS, HIGH);
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
SPI.setFrequency(1000000);
SD.begin(SD_CS);
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
audio.setVolume(6); //max 21
audio.connecttoFS(SD, "/bgm.wav");
//SerialBT.begin("test_espbt");
}
void loop() {
audio.loop();
}
The text was updated successfully, but these errors were encountered: