#include "FS.h"
#include "SD.h"
#include "SPI.h"
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
if(!SD.begin(5)){
Serial.println("Card Mount Failed");
return;
}
else{
Serial.println("Card Mount Works!");
}
uint8_t cardType = SD.cardType();
if(cardType == CARD_NONE){
Serial.println("No SD card attached");
return;
}
}
void loop() {
// put your main code here, to run repeatedly:
delay(100); // this speeds up the simulation
}
void listFile(File dir, int numTabs){
while(true){
File curEntry = dir.openNextFile();
if (! curEntry){
break;
}
for (uint8_t i = 0; i < numTabs; i++) {
Serial.print('\t');
}
Serial.print(curEntry.name());
if (curEntry.isDirectory()){
Serial.println("/");
listFile(curEntry, numTabs + 1);
}
else{
Serial.print("\t\t");
Serial.print(curEntry.size(), DEC);
}
curEntry.close();
}
}Loading
ili9341-cap-touch
ili9341-cap-touch