ESP32 and DY-SV8F - no sound

I've read that ESP32 and sound are not easy bedfellows. True for me, I've not managed to get any sound from my setup at all.

I'm running an ESP32 WROOM running a DY-SV8F. Or not.


#include <SoftwareSerial.h>

SoftwareSerial myMP3_TX(10, 11); // RX, TX

// Define the sound files
byte SOUND_1[] = {0x01, 0x0B, 0x11};
byte SOUND_2[] = {0x02, 0x0B, 0x11};
byte SOUND_3[] = {0x03, 0x0B, 0x11};
byte SOUND_4[] = {0x04, 0x0B, 0x11};

void setup() {
  Serial.begin(9600);
  myMP3_TX.begin(9600);
      Serial.println("The device started, now you can pair it with Bluetooth!");
}

void loop() {
  myMP3_TX.write(SOUND_1, sizeof(SOUND_1));
  delay(1000);
  myMP3_TX.write(SOUND_2, sizeof(SOUND_2));
  delay(1000);
  myMP3_TX.write(SOUND_3, sizeof(SOUND_3));
  delay(1000);
  myMP3_TX.write(SOUND_4, sizeof(SOUND_4));
  delay(1000);
}

No sound - I'm using earphones.
I get an output to the Serial Out, but no sound at all.

Ermm. Help?

My experience has actually been exactly the opposite!

What are you expecting the code you posted to do? If it's representative of a file to be played, you'll get less than a millisecond of sound, so at best you might hear a click.

OK. The thing is, I can't seem to find much in the way of how to format instructions to the DY-SV8F

This isn't really a final code, just me trying to work out how to make things work before using the codes in a larger code.

What I WANT to do is to play each of 4 files, at their full length, (they're each under a second anyway), seperated by a second.

THEN, (next thing I can't find documentation on), I'll want to be able to increase and decrease the volume.

Is there anywhere I can actually find the prompts to send to the DY?
If I could, I think, (hope), I could work this out myself.

I've got bluetooth working, independantly addressible leds working, spedding them up and down working, but sound is a whole new world. My guess is, it's not that different, just I don't kniw where to look.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.