You have not answered my question:-
How have you wired up the Arduino to the speaker?
Also an SD card is 3V3 and you have a 5V Arduino so have you got level shifters on those pins like it says here?
/*
SimpleSDAudio
Easily play audio files with Arduino from SD card in decent quality but
with very low external hardware.
Visit our hackerspace website for more information:
http://www.hackerspace-ffm.de/wiki/index.php?title=SimpleSDAudio
Pin-Mappings:
=================================================================================
PLATTFORM SD_CS MOSI MISO SCK SS PWM1 PWM2 Ocx1 Ocx2
mega368P (standard Arduinos) 4 11 12 13 10 9 10** 1A 1B
mega1280, mega2560 (mega Arduinos) 4 51 50 52 53 44 45 5C 5B
mega644 (Sanguino) 4 5 6 7 4 13 12 1A 1B
mega32U4 (Teensy 2.0) 0 2 3 1 0 14 15 1A 1B
mega32U4 (Leonardo) 0 na na na na 9* 10* 1A 1B
90USB646, 90USB1286 (Teensy++) 20 22 23 21 20 25 26 1A 1B
*change manual to output mode or change in SimpleSDAudio.h
This file has been truncated. show original
If I can use Simple SD Audio, actually there is not a problem, but i can't.
Correct you need to convert your wav file, have you seen: SimpleSDAudio – Hackerspace Ffm
Is your SD card formatted as a FAT file system?
The file extension AFM is made up by the author, it is not a standard name, that is why you can find no trace of it. Have you followed the instructions for changing your file format.
Why not use TMRpcm, then you don't have to convert the file? Home · TMRh20/TMRpcm Wiki · GitHub