Simple Nano-based music player using an sd card

I am just trying to build a simple system that reads a wav file from an SD card and sends it to a speaker. I have tried many, many times to get things working but to no avail. I can't here any audio at all, only initial static that comes from voltage when connecting the wires but nothing else. Any help would be appreciated.

My code:
#include "SD.h"
#define SD_ChipSelectPin 4
#include "TMRpcm.h"
#include "SPI.h"

TMRpcm tmrpcm;

void setup(){
tmrpcm.speakerPin = 9;
Serial.begin(9600);
if (!SD.begin(SD_ChipSelectPin)) {
Serial.println("SD fail");
return;
}

tmrpcm.setVolume(5);
tmrpcm.play((char *)"gustygarden");
}

void loop(){ }

My schematic translated to nano- https://www.electronicshub.org/wp-content/uploads/2019/04/Music-Player-using-Arduino-Circuit-Diagram.jpg

Hi, @
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

@tazlad circuit;

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Hi,
Have you read this page and YouTube references?

Tom... :smiley: :+1: :coffee: :australia:

I don't know if the SD library supports long names. The main difference between your sketch and the 'basic' example of the library is that their file is named 'music'. Perhaps a name of 8 or fewer characters will work?

I tried renaming it, but unfortunately no dice

I have but didn't see anything that could fix my issue

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