WEB radio on ESP32-S3-WROOM-1 no sound or just a buzzer

I’m trying to build a web radio basic schematic, from internet.

ESP32-S3 board and MAX98357.

I see the board connected to Internet on my firewall.

The URL connected to works perfect on my computer.

I tried different GPIO settings. Either I have sound like a buzzer or silence.

Serial monitor shows:

10.200.200.4

Total PSRAM: 8388608

Here is the sketch:


```cpp
#include <Arduino.h>
#include <WiFi.h>
#include <Audio.h>
#define I2S_DOUT     4
#define I2S_BCLK      5
#define I2S_LRC        14
Audio audio;
String ssid =    "P";
String password = "s";
void setup() {
  WiFi.disconnect();
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid.c_str(), password.c_str());
  while (WiFi.status() != WL_CONNECTED)
  delay(1500);
  Serial.begin(115200);
  Serial.println(WiFi.localIP());
  Serial.printf("Total PSRAM: %d\n", ESP.getPsramSize());
  audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
  audio.setVolume(100);
  //audio.connecttohost("https://playerservices.streamtheworld.com/api/livestream-redirect/CJFMFM.mp3");
  audio.connecttohost("http://vis.media-ice.musicradio.com/CapitalMP3");
  Serial.println("Music now");
}
void loop()
{
  audio.loop();
}
```

Please post mandatory schematics for a project like this. Know that we know only what You show us.

@Railroader Above is the basic diagram

Thanks. Looks rather okey.

From where does “5 volt” come?

@Railroader

Playing with the different GPIO settings I got working. I also added Internet connection OnDemand, based on Tzapu library. Next step to add a rotary switch to change the sations.

Help will always be appreciated.

Here is the current working sketch:


```cpp
#include <Arduino.h>
//#include <WiFi.h>
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager

#include <Audio.h>
#define I2S_DOUT     12
#define I2S_BCLK      13
#define I2S_LRC        14

// select which pin will trigger the configuration portal when set to LOW
#define TRIGGER_PIN 46

int timeout = 120; // seconds to run for

Audio audio;
//String ssid =    "P";
//String password = "s";
void setup() {
  //WiFi.disconnect();
  //WiFi.mode(WIFI_STA);
  //WiFi.begin(ssid.c_str(), password.c_str());
  //while (WiFi.status() != WL_CONNECTED)
  Serial.begin(115200);
  pinMode(TRIGGER_PIN, INPUT_PULLUP);
while (digitalRead(TRIGGER_PIN) == HIGH) { 
  Serial.println("\n Waiting for button");
  delay(1500);
  }
   WiFiManager wm;    

    //reset settings - for testing
    wm.resetSettings();
  
    // set configportal timeout
    wm.setConfigPortalTimeout(timeout);

    if (!wm.startConfigPortal("OnDemandAP")) {
      Serial.println("failed to connect and hit timeout");
      //delay(3000);
      //reset and try again, or maybe put it to deep sleep
      ESP.restart();
      //delay(5000);
    }


  
  delay(1500);
  Serial.begin(115200);
  Serial.println(WiFi.localIP());
  Serial.printf("Total PSRAM: %d\n", ESP.getPsramSize());
  audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
  audio.setVolume(100);
  audio.connecttohost("https://playerservices.streamtheworld.com/api/livestream-redirect/CJFMFM.mp3");
  //audio.connecttohost("http://vis.media-ice.musicradio.com/CapitalMP3");
  Serial.println("Music now");
}
void loop()
{
  audio.loop();
}

```

No. It comes from out ouf the sky.

So no remaining question, no more help needed?

Anyone can help implementing KY-040 360 Degrees Rotary Encoder, please?

@Railroader

I asked for more help, nobody answered.

Please post a link to the datasheet of the exact decider You've got.

@Railroader

Can you, please, elaborate?

Sorry. The bastard AI changed the message.

Please post a link to the datasheet of the exact encoder You've got.

@Railroader

KY-040 360 Degrees Rotary Encoder

Datasheet please.

@Railroader

Make a test code for the encoder and make it work. Start by using the example in the datasheet.

Then is the question how You want the encoder to affect the build.

@Railroader

Thanks, I will work on it, and I will let you know.

Please do. Know that there will be a need for a sum up for both code and wiring to give a clear overview.

@Railroader

I’ll do my best.

I’m trying to built a web radio. My first radio that I built, was a Galena!!! Now you know my age.