schreibfaul1 / ESP32-vs1053_ext

With this library You can easily build a WebRadio with a ESP32 board and a mp3-module. See: https://www.youtube.com/watch?v=u4u9NvZvWRk
GNU General Public License v3.0
105 stars 29 forks source link

Compatibility with Adafruit's VS1053 module (Music Maker FeatherWing) #35

Open th-thomas opened 1 year ago

th-thomas commented 1 year ago

I have an ESP32-S3 Feather TFT, and an Adafruit Music Maker FeatherWing (VS1053) module.

I think I've sorted out the pins correctly (I verified with the Music Maker pins documentation):

#define VS1053_CS 6
#define  VS1053_DCS 10
#define  VS1053_DREQ 9
#define  SD_CS 5

VS1053 audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, HSPI, MOSI, MISO, SCK);

I can start a web radio stream successfully. However, I get no audio out of the VS1053. Moreover, SD.begin() returns false. If I try to print the VS1053's SCI_STATUS, I get 0.

What do you think could be the issue?

Below is my main.cpp:

#include <Arduino.h>
#include <SPI.h>
#include <WiFi.h>
#include <vs1053_ext.h>

#define VS1053_CS 6
#define VS1053_DCS 10
#define VS1053_DREQ 9
#define SD_CS 5

String ssid = "****";
String password = "****";

VS1053 audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, HSPI, MOSI, MISO, SCK);

void setup()
{
  delay(5000);
  pinMode(SD_CS, OUTPUT);
  digitalWrite(SD_CS, HIGH);
  Serial.begin(115200);
  SPI.begin(SCK, MISO, MOSI);
  if (!SD.begin()) {
    Serial.println("SD Card Mount Failed");
  };
  WiFi.disconnect();
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid.c_str(), password.c_str());
  while (WiFi.status() != WL_CONNECTED) {
    Serial.println("Not connected to AP");
    delay(1500);
  }
  Serial.println("Connected to AP");
  audio.begin();
  audio.setVolume(15);                                                                              
  auto connectedToWebRadio = audio.connecttohost("http://icecast.radiofrance.fr/franceinfo-hifi.aac"); // aac
  if (connectedToWebRadio) {
    Serial.println("Connected to web radio");
  } else {
    Serial.println("Failed to connect to web radio");
  }

  // SD.exists("sample.mp3") ? Serial.println("sample.mp3 exists") : Serial.println("sample.mp3 does not exist");
}
th-thomas commented 12 months ago

Any idea?

th-thomas commented 11 months ago

Updated my issue.