i want to mount the SD card using Round Display for xiao, but it never mounts. am i doing something wrong?
This is the code Im using
tft.init();
pinMode(D2, OUTPUT);
while (!cardMounted) {
if (SD.begin(D2)) {
uint8_t cardType = SD.cardType();
if (cardType != CARD_NONE) {
cardMounted = true;
Serial.println("SD Card Mounted Successfully");
} else {
Serial.println("No SD card attached");
}
} else {
Serial.println("Card Mount Failed");
Serial.println("Retrying to mount SD card...");
delay(1000);
}
}