How to make it work as codes around the internet are for SD Cards only.
Code: Select all
#include "SPIFFS.h"
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>
#define TFT_CS 5
#define TFT_RST 4
#define TFT_DC 2
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
void setup(void) {
Serial.begin(9600);
Serial.println(F("Setup Initiated"));
if (!SPIFFS.begin(true)) {
Serial.println(F("An Error has occurred while mounting SPIFFS"));
return;
}
File root = SPIFFS.open("/");
File file = root.openNextFile();
while(file){
Serial.print("FILE: ");
Serial.println(file.name());
file = root.openNextFile();
}
tft.initR(INITR_MINI160x80);
tft.setRotation(3);
tft.fillScreen(ST77XX_BLACK);
}
void loop() {
}