Sorry about not including code. See following (I realize that I don't follow all formatting standards, but like to see more code on screen at one time). also I am running a Mega2560 board connected to a Windows10 laptop.
void loop() {
char buffer[5], CF1[5], CF2[5], CF3[5], CRsen1[6], CRsen2[6], CRsen3[6], CVout1[5], CVout2[5], CVout3[5];
int ThermPin1 = 1; // Analog input pin for 1st thermistor voltage (o/p evac tubes)
int ThermPin2 = 2; // Analog input pin for 2nd thermistor voltage (o/p hw tank)
int ThermPin3 = 3; // Analog input pin for 3rd thermistor voltage (b'ment air temp)
double R=10000.0, BB1=3470.0, B2=3950.0, Rsen1=0.0, Rsen2=0.0, Rsen3=0.0; // Fixed resistance in the voltage divider; "B" value; Sensor resistance
double T1=0.0, F1=0.0, T2=0.0, F2=0.0, T3=0.0, F3=0.0; // T is Temp Celcius F is Temp Farenheit
double Vout1=0.0, Vout2=0.0,Vout3=0.0; // Analog pin reading
dataFile = SD.open("SensorLg.txt", FILE_WRITE); // SensorLg.txt is the log file for sensor data readings
// collect and display reading from 1st thermistor (NTC 10k B=3470) (o/p evac tubes - in basement)
ThermSensor(ThermPin1, R, BB1, Vout1, Rsen1, F1, T1);
itoa((int(Rsen1)),CRsen1,10); itoa((int(Vout1)),CVout1,10);
delay (1000);
// collect and display reading from 2nd thermistor(NTC 10k B=3470) (o/p hw tank)
ThermSensor(ThermPin2, R, BB1, Vout2, Rsen2, F2, T2);
itoa((int(Rsen2)),CRsen2,10); itoa((int(Vout2)),CVout2,10);
delay (1000);
// collect and display reading from 3rd thermistor(NTC 10k B=3470) (o/p hw tank)
ThermSensor(ThermPin3, R, BB1, Vout3, Rsen3, F3, T3);
itoa((int(Rsen3)),CRsen3,10); itoa((int(Vout3)),CVout3,10);
// Relay 2 pin 7 -- HW Heater
// Relay 3 pin 8 -- HW Loop Pump (LOW when either relay 2 or relay 4 LOW)
// relay 4 pin 9 -- SOlar Pump
// relay 5 pin ?? -- Basement space heater
// Determine relay settings HIGH=120vac power off; LOW=120vac power on;
int pin7=0, pin8=0, pin9=0;
char Cpin7[5], Cpin8[5], Cpin9[5];
// vacation time limits hot water heater use just to not freeze 105.0 winter hot water; 80.0 summer hot water; 50.0 prevent freezing
F1=F1-10; itoa((int(F1)),CF1,10); // adjust evac tube to actual based on test readings
F2=F2+ 6; itoa((int(F2)),CF2,10); // adjust HW to actual based on test readings
F3=F3+ 2; itoa((int(F3)),CF3,10); // adjust b'ment air to actual based on test readings
if ((F1-10.0 > F2) || (F1 > 100.0)) { digitalWrite(9, LOW); digitalWrite(8, LOW); }
else { digitalWrite(9, HIGH); }
if ((F2 < 105.0) && (mm<30)) { digitalWrite(7, LOW); digitalWrite(8, LOW); } // 105.0 winter hot water; 80.0 summer hot water; 50.0 prevent freezing
else { digitalWrite(7, HIGH); }
if (((mm<15)&& (mm>10)) || ((mm<35) && (mm>30)) || ((mm<55) && (mm>50)) && ((hh<19) && (hh>7))) {digitalWrite(9, LOW); digitalWrite(8, LOW); // activate Solar pump 12 min/hr to prevent overheating
digitalWrite(7, LOW); digitalWrite(8, LOW); digitalWrite(9, LOW);} // activate Solar & HW Heater 12 min/hr to provide some heat
if ((digitalRead(9)==HIGH) && (digitalRead(7)==HIGH)) {digitalWrite(8, HIGH); };
if (digitalRead(7)==HIGH) {pin7=1;} else {pin7=0;};
if (digitalRead(8)==HIGH) {pin8=1;} else {pin8=0;};
if (digitalRead(9)==HIGH) {pin9=1;} else {pin9=0;};
if (k==cycle) { k=0; }
if (k==0) { if (dataFile) {
dataString = int(F1) + Comma + int(F2) + Comma + int(F3) + Comma + pin7 + Comma + pin8 + Comma + pin9 + Comma + mo + Comma + dd + Comma + yy + Comma + hh + Comma + mm + Comma + ss;
dataFile.println(dataString);
dataFile.close();
// print to the serial port too:
Serial.println(dataString); } }
//
k++;
delay (58000);
TimeOfDay();
}