[Solved]Need help with MKR ZERO

Just bought my first Ardunio a few days ago, and I'm trying to use this script https://www.arduino.cc/en/Tutorial/SimpleAudioPlayerZero to play an audio file. But every time I upload to the MKR ZERO it fails to initialize the SD card, and no sound will play. How do I get this to work?

32 gb SDHC formatted FAT32 with Windows using default allocation.

Try checking your wiring, it sounds like a conflict with the CS pin, Just guessing as I have not gotten through all of the information you sent.

Arduino MKR ZERO offers the power of a ZERO in a smaller MKR form factor and can be used to learn 32-bit application development. The board is powered by Atmel’s SAMD21 MCU, which features a 32-bit ARM Cortex® M0+ core. The ZERO has an on-board SD connector with dedicated SPI interfaces (SPI1) that can play MUSIC files with no extra hardware.

Note that the software you are trying to use is for the Arduino Due

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU. It is the first Arduino board based on a 32-bit ARM core microcontroller.

So therefore it is a different processor so why would you expect it to work? I am sure that it could be made to work but you would have to dig into the software and see what is different between the two processors.
Are you sure that the onboard SD card reader is pinned out the same as the Due code is expecting.

I ended up switching the polarity for the speaker wires and changing !SD.begin(4) to !SD.begin() and finally got some sound out of it. I'm very new to this, so I don't really know what I'm doing.

Grumpy_Mike:
Note that the software you are trying to use is for the Arduino Due
So therefore it is a different processor so why would you expect it to work? I am sure that it could be made to work but you would have to dig into the software and see what is different between the two processors.
Are you sure that the onboard SD card reader is pinned out the same as the Due code is expecting.

My mistake, that's the wrong link. Sorry.

I ended up switching the polarity for the speaker wires

That should have no effect.