We are having issues playing .wav files through our arduino. I have attached our wiring diagram. I found instructions slightly modifying the pin locations - this recommendation was made for the board we have.
We followed this video (https://www.youtube.com/watch?v=6DRayPCqK04&t=12s) (How to Play audio with Arduino | Audio in Arduino | How connect Speaker with Arduino | Fair Electro) and had no success, we combined what we saw in the video with the instructions from adafruit which is where we got our breakout board (Adafruit Mini SD breakout). Here is our code
<#include <pcmRF.h> #include <pcmConfig.h> #include <TMRpcm.h>
Then why does your diagram show a Uno. I know because that pile of crap called fritzing doesn’t have a Mega. This is why you should not use it but sketch a schematic and post a picture of it.
Ok so there is potentially a lot wrong with that circuit. You feed 5V into an SD card and feed the 5V signals from the Arduino into it as well. Now does the SD card board have an built in voltage regulator and level shifters? If not you may have screwed it already.
Now that transistor, there is no base resistor, that over strains the Arduino pin. There is no AC coupling, that is connecting the speaker through a capacitor. Thus means you get DC in the speaker which can push out the cone, and the cone only goes from centre to fully out, it never goes in. Is the pinout of the transistor correct?
You have obviously ignored the page you were directed to because your code is not posted correctly. Have you checked if the library you are using can cope with the different timer structure of the Mega?
I am sure you have not produced that circuit, but who ever did want a severe telling off.