pins for connecting a MKRx to an I2S Microphone

In the "official" tutorial for the I2S microphone, e.g. https://www.arduino.cc/en/Tutorial/ArduinoSoundSpectrumSerialPlotter I found in the code example this snippet

 Circuit:
 * Arduino/Genuino Zero, MKRZero or MKR1000 board
 * ICS43432:
   * GND connected GND
   * 3.3V connected 3.3V (Zero) or VCC (MKR1000, MKRZero)
   * WS connected to pin 0 (Zero) or pin 3 (MKR1000, MKRZero)
   * CLK connected to pin 1 (Zero) or pin 2 (MKR1000, MKRZero)
   * SD connected to pin 9 (Zero) or pin A6 (MKR1000, MKRZero)

So I would assume that I have to use e.g. for the WS (Word Select / Frame Select) pin 0 for the "normal" Arduino Zero and pin 3 for the MKR1000 and MKRZero.

But have a look at the corresponding Fritzing wiring on top of the same page:

It's the MKRx board but wiring is:

  • WS -> pin 2
  • CLK -> pin 1
  • SD -> pin A5
    So what is correct? The information in the Fritzing schema or the comment in the code?

Hi @Clemens

From looking at the MKRZero variant (ArduinoCore-samd/variant.h at master · arduino/ArduinoCore-samd · GitHub):

#define I2S_DEVICE          0
#define I2S_CLOCK_GENERATOR 3
#define PIN_I2S_SD          (PIN_A6)
#define PIN_I2S_SCK         (2u)
#define PIN_I2S_FS          (3u)

The WS/FS pin is 3 and the SCK/CLK pin is 3, so the comments are correct.