Closed Thiemann96 closed 5 months ago
#include "SD.h"
#include "SPI.h"
void writeFile(fs::FS &fs, const char * path, const char * message){
Serial.printf("Writing file: %s\n", path);
File file = fs.open(path, FILE_WRITE);
file.close();
}
void setup() {
// put your setup code here, to run once:
pinMode(SD_ENABLE,OUTPUT);
digitalWrite(SD_ENABLE,LOW);
SPIClass sdspi = SPIClass();
sdspi.begin(VSPI_SCLK,VSPI_MISO,VSPI_MOSI,VSPI_SS);
writeFile(SD, "/hello.txt", "Hello ");
}
void loop() {
// put your main code here, to run repeatedly:
}
Needs to be adjusted to this example. The code in blockly somehow breaks the MCU where you have to manually reset it