OK. In my ongoing, (so far totally unsuccessful) attempt to get some sound from my ESP32.....
I'm wanting to connect to a DY-SV17F, to integrate into a working app, running an led strip controlled by an MIT app via bt.
SO... I have installed DYPlayerArduino.h, and am fiddleing around, while beginning, trying to use examples from the DYPlayerArduino designer. And failing at the first post.
This code, from the example:
#include "DYPlayerArduino.h"
#include <SoftwareSerial.h>
// Initialise on software serial port.
SoftwareSerial SoftSerial(10, 11);
DY::Player player(&SoftSerial);
void setup() {
player.begin();
// Also initiate the hardware serial port so we can use it for debug printing
// to the console..
Serial.begin(9600);
player.setVolume(15); // 50% Volume
player.setCycleMode(DY::PlayMode::Repeat); // Play all and repeat.
player.play();
}
void loop() {
// Print the number of the sound that is playing.
Serial.print("Playing sound: ");
Serial.println((int16_t)player.getPlayingSound());
delay(500);
}
Results in:
C:\Users\cex\AppData\Local\Temp\.arduinoIDE-unsaved2024215-6600-5ig6k5.xc2bs\SoftwareSerial\SoftwareSerial.ino:7:20: note: suggested alternative: 'Serial'
DY::Player player(&SoftSerial);
^~~~~~~~~~
Serial
exit status 1
Compilation error: 'SoftwareSerial' does not name a type; did you mean 'HardwareSerial'?
Help? I know this shows a lack of understanding for how libraries work, but I'm fairly new to this, I can't find much information on programming for the DY series, and I'm also pretty new to Arduino/ESP32