SD debug, commentaires errorCode, change include wire.h

This commit is contained in:
pgp 2021-04-16 10:34:22 +02:00
parent 534afa72ec
commit d31492a0de

View file

@ -4,7 +4,7 @@
#include "SD.h"
#include "SPI.h"
#include "RTClib.h"
#include <Wire.h>
#include "Wire.h"
#include "driver/pcnt.h"
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
@ -233,7 +233,7 @@ void writeFile(fs::FS &fs, const char * path, const char * message){
File file = fs.open(path, FILE_WRITE);
if(!file){
Serial.println("Failed to open file for writing");
errorCode(2);
//errorCode(2);
return;
}
if(file.print(message)){
@ -317,14 +317,14 @@ void sd_init() {
if(cardType == CARD_NONE){
Serial.println("No SD card attached");
errorCode(4);
//errorCode(4);
return;
}
if(!SD.begin()){
Serial.println("Card Mount Failed");
errorCode(3);
//errorCode(3);
return;
}