Dfplayer mini with SERCOM in nano 33 iot

#include "wiring_private.h"
#include "DFRobotDFPlayerMini.h"

Uart mySerial (&sercom0, 10, 11, SERCOM_RX_PAD_2, UART_TX_PAD_0);

DFRobotDFPlayerMini myDFPlayer;

void setup() {
  mySerial.begin(9600);
  myDFPlayer.begin(mySerial);
  myDFPlayer.volume(20);
  myDFPlayer.play(1);
}

void loop() {
  if (myDFPlayer.available()) {
    myDFPlayer.play(1);
  }
}

Can someone please tell me what is wrong with this code?
Is digital pin 10 and 11 are compatible to be serial port in nano 33 iot?
I did not put a resistor because i only input low voltage to it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.