It's a part of a program too, I just dont understand how it should be. Here is the code (part)
I think that the problem is in SD.begin()
after uploading code, the screen doesn't work and I get Card Mount Failed in Monitor
Code: Select all
#include <TFT_eSPI.h>
#include "FS.h"
#include "SD.h"
#include <SPI.h>
#include <Wire.h>
#define HSPI_MISO 26
#define HSPI_MOSI 15
#define HSPI_SCLK 13
#define HSPI_SS 2
#define SDSPEED 27000000
SPIClass * hspi = NULL;
void setup() {
Serial.begin(115200);
hspi = new SPIClass(HSPI);
hspi->begin(HSPI_SCLK, HSPI_MISO, HSPI_MOSI, HSPI_SS);
pinMode(HSPI_SS, OUTPUT);
//
if(!SD.begin()) //SD.begin(HSPI_SCLK, *hspi, SDSPEED)
{ Serial.println("Card Mount Failed");
return; }
else Serial.println("SD ok");
}