         delay(10);
     }
     // calculate the voltage
+    //https://startingelectronics.org/articles/arduino/measuring-voltage-with-arduino/
     // use 5.0 for a 5.0V ADC reference voltage
     // 5.015V is the calibrated reference voltage
     voltage = ((float)sum / (float)NUM_SAMPLES * 5.05) / 1024.0;


  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile = SD.open("data.txt", FILE_WRITE);

  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  // retrieve data from DS3231

unsigned int timeToSleep = 1; //use this to control the value going to the clock register. Set it to the # minutes desired to log
int timeCount = 0; //don't modify this
float temperature = -12345;
String filename = filename;

SPISettings mySettings;
DS3231 clock;
