I'm making a project on gesture to speech using arduino uno r3,flex sensors,lcd,dfplayer(first copy)and a 8ohm/0.5w speaker.
Till now i didn't face any problems with connections till lcd but i cannot generate the sound from the speakers.I tried formatting the sd card,we have mp3 files too,added a 9v battery to circuit,checked all connections but still didn't work.It generated some kind of sound from speaker at the beginning but when we tried uploading the code it didn't work.Kindly suggest me some solutions or some alternative that is feasible and easy to use.This is the code-
#include <DFPlayerMini_Fast.h>
#if !defined(UBRR1H)
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3); // RX, TX
#endif
DFPlayerMini_Fast myMP3;
void setup()
{
Serial.begin(115200);
#if !defined(UBRR1H)
mySerial.begin(9600);
myMP3.begin(mySerial, true);
#else
Serial1.begin(9600);
myMP3.begin(Serial1, true);
#endif
delay(1000);
Serial.println("Setting volume to max");
myMP3.volume(30);
Serial.println("Looping track 1");
myMP3.loop(1);
}
void loop()
{
//do nothing
}