Hello,
I am currently working on an ESP32 CAM. I had a code writting on a micro SD but my cam broke. I bought a new one but I can no more write on the micro SD even with basic code like this one:
#include "FS.h"
#include "SD_MMC.h"
void setup() {
Serial.begin(115200);
Serial.println("Initialisation de la carte SD...");
if (!SD_MMC.begin()) {
Serial.println("Erreur initialisation carte SD");
Serial.println("Vérifiez les connexions et le formatage de la carte SD");
return;
}
Serial.println("Carte SD initialisée avec succès.");
// Créez un fichier et écrivez dedans
File file = SD_MMC.open("/test.txt", FILE_WRITE);
if (!file) {
Serial.println("Erreur ouverture fichier");
return;
}
file.println("Test de la carte SD");
file.close();
Serial.println("Fichier créé et écrit.");
// Lisez le fichier
file = SD_MMC.open("/test.txt");
if (!file) {
Serial.println("Erreur ouverture fichier pour lecture");
return;
}
while (file.available()) {
Serial.write(file.read());
}
file.close();
}
void loop() {
// Rien à faire dans la boucle
}
I get some error that I don't understand.
Initialisation de la carte SD...
E (514) sdmmc_sd: sdmmc_init_sd_ssr: sdmmc_send_cmd returned 0xffffffff
E (514) vfs_fat_sdmmc: sdmmc_card_init failed (0xffffffff).
Erreur initialisation carte SD
Vérifiez les connexions et le formatage de la carte SD
(sorry for the french logs)
I tried to format the micro sd with the "slow way"
But at the end I get an message telling me " windows failed format".
I am really lost. Can someone help me please? By the way I don't have anoother sd to test ![]()
