MKZero board for a simple audio speaker

So I following the instructions of this URL to connect the circuit with the MKZero board. However, when I put the codes(also in this URL), the IDE says error for the board.

Here is the code:
Simple Audio Player for Arduino Zero

Demonstrates the use of the Audio library for the Arduino Zero

Hardware required :

  • Arduino shield with a SD card on CS4
  • A sound file named “test.wav” in the root directory of the SD card
  • An audio amplifier to connect to the DAC0 and ground
  • A speaker to connect to the audio amplifier

Arturo Guadalupi
Angelo Scialabba
Claudio Indellicati

This example code is in the public domain


#include <SD.h>
#include <SPI.h>
#include <AudioZero.h>

void setup()
// debug output at 115200 baud

// setup SD-card
Serial.print(“Initializing SD card…”);
if (!SD.begin(4)) {
Serial.println(" failed!");
Serial.println(" done.");

// 44100kHz stereo => 88200 sample rate

void loop()
int count = 0;

// open wave file from sdcard
File myFile =“test.wav”);
if (!myFile) {
// if the file didn’t open, print an error and stop
Serial.println(“error opening test.wav”);
while (true);


// until the file is not finished;

Serial.println(“End of file. Thank you for listening!”);
while (true) ;

The error message: : fatal error: AudioZero.h: No such file or directory
#include <AudioZero.h>
compilation terminated.
exit status 1
Error compiling for board Arduino MKRZero.

Could someone help me fix it, thanks!

Anyone have an answer for this yet? I have the same problem.

The example you linked to compiles just fine in the web editor but fails in the desktop.
You could post it as an issue on GITHUB for the cores.

I did not use the sketch you posted as there could be errors in it as it was not posted as code ( </> )


The reason for my failure was down to a year out from Arduino.....and gross stupidity. I forgot to ensure I had the AudioZero library installed :-[

I'd guess the OP had made the same mistake.