Skip to content

Instantly share code, notes, and snippets.

@martinschierle
Created May 29, 2021 15:28
Show Gist options
  • Save martinschierle/babf5261d073ae2b5882106e1dd47380 to your computer and use it in GitHub Desktop.
Save martinschierle/babf5261d073ae2b5882106e1dd47380 to your computer and use it in GitHub Desktop.
#include "SPIFFS.h"
void setup() {
Serial.begin(115200);
if(!SPIFFS.begin(true)){
Serial.println("An Error has occurred while mounting SPIFFS");
return;
}
File file2 = SPIFFS.open("/loradata.txt");
if(!file2){
Serial.println("Failed to open file for reading");
return;
}
Serial.println("File Content:");
while(file2.available()){
Serial.write(file2.read());
}
file2.close();
}
void loop() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment