I'm trying to find the problem with my code other than the simple, it doesn't work. The wiring all appears to be correct, and I'm suspecting a software problem, but I'm not having any luck finding it myself. I've also verified that the card is good and writeable.

```c
#include <SPI.h>
#include <SD.h>

// HSPI
#define HSPI_SCLK 14
#define HSPI_MISO 4
#define HSPI_MOSI 13
#define HSPI_CS 2

SPIClass * hspi = NULL;

String dataString =""; // holds the data to be written to the SD card
File sensorData;

void setup() {

  hspi = new SPIClass(HSPI);
  hspi->begin(HSPI_SCLK, HSPI_MISO, HSPI_MOSI, HSPI_CS); //SCLK, MISO, MOSI, SS
  pinMode(HSPI_CS, OUTPUT); //HSPI SS

  Serial.begin(115200);

  // see if the card is present and can be initialized:
  if (!SD.begin(HSPI_CS)) {
    Serial.println("Card failed, or not present");
  }

  if (SD.exists("data.csv")) {
    Serial.println("data.csv exists.");
  }
  else {
    Serial.println("data.csv doesn't exist.");
  }

  // open a new file and immediately close it:
  Serial.println("Creating data.csv...");
  sensorData = SD.open("data.csv", FILE_WRITE);
  sensorData.close();

  // Check to see if the file exists:
  if (SD.exists("data.csv")) {
    Serial.println("data.csv exists.");
  }
  else {
    Serial.println("data.csv doesn't exist.");
  }
  while(1);
}

void loop() {

}

```

This is running on the TTGO T-Beam. I'm specifying pins for SPI because the default pins aren't available since they're integrated with the LoRa chip. I'm not super familiar with using SPI, and this approach is new to me, but I've seen a lot of documentation for it online.

How can I figure out why I'm not reading/writing to my SD card?