Using DST RTC by Andy Doro

I have an Arduino Uno that I am truing to incorporate the daylight saving time for a project. I hasve installed the DST RTC by Andy Doro version 1.1.1.
Please see the code below:

// Author : John Marchant G0RJM
// Created : 25/01/2024
// Description : A project to display the current date, time and temperature on the 20x4 LCD screen
// and create a thermostatic heating control of three zones to include frost protection.
// This has been based on the RTClib ds3231 example along with many parts borrowed
// from several other files/sketches and in collaboration with several authors from the
// Arduino Forum in particular blh64, StefanL38 and UKHeliBob.

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include "RTClib.h"
#include <OneWire.h>
#include <DallasTemperature.h>
#include "DST_RTC.h"

#define ONE_WIRE_BUS_1 3
#define ONE_WIRE_BUS_2 4
#define ONE_WIRE_BUS_3 5

OneWire oneWire_range(ONE_WIRE_BUS_1);
OneWire oneWire_club(ONE_WIRE_BUS_2);
OneWire oneWire_airgun(ONE_WIRE_BUS_3);

const byte range_relay = 9;  // Relay outputs
const byte club_relay = 10;
const byte airgun_relay = 11;
const byte boiler_relay = 12;

float range_temperature;
float club_temperature;
float airgun_temperature;

const float temperature_setpoint_range = 22.0;   // C
const float temperature_setpoint_club = 22.0;    // C
const float temperature_setpoint_airgun = 22.0;  // C
const float frost_setpoint = 22.0;               // C
const float deadzone = 1.0;                      // C

const int SCREEN_ON_TIME = 30000;
const int backlight_buttonPin = 8;
int buttonState = 0;
unsigned long currentMillis = 0;
unsigned long previousMillisScreen = 0;
bool screenOn = false;

DallasTemperature sensor_range(&oneWire_range);
DallasTemperature sensor_club(&oneWire_club);
DallasTemperature sensor_airgun(&oneWire_airgun);

enum { SUNDAY,
       MONDAY,
       TUESDAY,
       WEDNESDAY,
       THURSDAY,
       FRIDAY,
       SATURDAY };

const int On_Normal = 16 * 60UL + 00;   // 16:00
const int Off_Normal = 21 * 60UL + 30;  // 21:30
const int On_Sunday = 12 * 60UL + 00;   // 12:00 for Sundays
const int Off_Sunday = 17 * 60UL + 30;  // 17:30 for Sundays

#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
// Required for Serial on Zero based boards
#define Serial SERIAL_PORT_USBVIRTUAL
#endif

LiquidCrystal_I2C lcd(0X27, 20, 4);
RTC_DS3231 rtc;
DST_RTC dst_rtc;

char daysOfTheWeek[7][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
byte char_temp[8] = { B00100, B01010, B01010, B01110, B01110, B11111, B11111, B01110 };  // for thermometer icon

void setup() {

  pinMode(range_relay, OUTPUT);
  pinMode(club_relay, OUTPUT);
  pinMode(airgun_relay, OUTPUT);
  pinMode(boiler_relay, OUTPUT);
  pinMode(backlight_buttonPin, INPUT);

  rtc.begin();
  lcd.init();
  lcd.backlight();
  lcd.createChar(0, char_temp);
  lcd.setCursor(4, 0);
  lcd.print("Take it easy!");
  lcd.setCursor(4, 1);
  lcd.print("Working on it");
  lcd.setCursor(2, 2);
  lcd.print("G0RJM Three Zone");
  lcd.setCursor(1, 3);
  lcd.print("Temperature Control");
  delay(1000);
  lcd.clear();
  if (rtc.lostPower()) {
    // When the time needs to be set up on a new device, or after a power loss, uncomment the
    // following line. This sets the RTC to the date & time this sketch was compiled
    // rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }
/*
    This line sets the RTC with an explicit date & time (standard time - not DST), for example to set
    March 28, 2020 at 23:58:5 you would call:
    // rtc.adjust(DateTime(2020, 3, 28, 23, 58, 5));
    If used load the sketch a second time with this line commented out or the RTC will reset to
    this time on power up or reset.
  */

  Serial.begin(9600);
  Serial.println("G0RJM Three zone Temperature Control");

  wire.begin();

  sensor_range.begin();
  sensor_club.begin();
  sensor_airgun.begin();

  if (! rtc.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(__DATE__, __TIME__));
    // DST? If we're in it, let's subtract an hour from the RTC time to keep our DST calculation correct. This gives us
    // Standard Time which our DST check will add an hour back to if we're in DST.
    DateTime standardTime = rtc.now();
    if (dst_rtc.checkDST(standardTime) == true) { // check whether we're in DST right now. If we are, subtract an hour.
      standardTime = standardTime.unixtime() - 3600;
    }
    rtc.adjust(standardTime);
  }
}

//--------------------------Timeswitch Control---------------------------//
void loop() {

  DateTime now = rtc.now();
  int currentTime = now.hour() * 60UL + now.minute();

  bool isHeatOn;  // true = heating time

  //------------------------Daylight Saving Setting=---------------------//
  {
    DateTime standardTime = rtc.now();

  Serial.println("Standard Time");
  printTheTime(standardTime);

  DateTime theTime = dst_rtc.calculateTime(standardTime); // takes into account DST

  Serial.println("time adjusted for Daylight Saving Time");
  printTheTime(theTime);

  delay(1000); // 1 second
}


// print time to serial
void printTheTime(DateTime theTimeP) {
  Serial.print(theTimeP.year(), DEC);
  Serial.print('/');
  Serial.print(theTimeP.month(), DEC);
  Serial.print('/');
  Serial.print(theTimeP.day(), DEC);
  Serial.print(' ');
  Serial.print(theTimeP.hour(), DEC);
  Serial.print(':');
  Serial.print(theTimeP.minute(), DEC);
  Serial.print(':');
  Serial.print(theTimeP.second(), DEC);
  Serial.println();
}
  }

I get this error code and would like some guidance please.

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal I2C@1.1.2]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal I2C@1.1.2]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for RTClib.h: [RTClib@2.1.3]
ResolveLibrary(RTClib.h)
  -> candidates: [RTClib@2.1.3]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for Adafruit_I2CDevice.h: [Adafruit BusIO@1.15.0]
ResolveLibrary(Adafruit_I2CDevice.h)
  -> candidates: [Adafruit BusIO@1.15.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for OneWire.h: [OneWire@2.3.7]
ResolveLibrary(OneWire.h)
  -> candidates: [OneWire@2.3.7]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for DallasTemperature.h: [DallasTemperature@3.9.0 MAX31850 DallasTemp@1.1.6]
ResolveLibrary(DallasTemperature.h)
  -> candidates: [DallasTemperature@3.9.0 MAX31850 DallasTemp@1.1.6]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for EEPROM.h: [EEPROM@2.0]
ResolveLibrary(EEPROM.h)
  -> candidates: [EEPROM@2.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for EEPROM.h: [EEPROM@2.0]
ResolveLibrary(EEPROM.h)
  -> candidates: [EEPROM@2.0]
C:\Users\johnm\Documents\Arduino\Three_zone_heating_controller_V1.2.7\Three_zone_heating_controller_V1.2.7.ino:14:10: fatal error: DST_RTC.h: No such file or directory
 #include <EEPROM.h>
          ^~~~~~~~~~ 
compilation terminated.
exit status 1

Compilation error: DST_RTC.h: No such file or directory

It would appear you have not installed the library since the error given says the file does not exist.

Did you install it using the Library Manager?

Afternoon @blh64, yes I used the Library Manager and was able to view the file via the examples and then proceeded to add/copy the code to my existing sketch. I will go back and remove the library and then try re-installing it.

I have uninstalled this library. Close the IDE and reopened it. Reinstalled this library.

I will continue to investigate as I am sure that I may have mistyped something.

I think I may have stumbled accross my error! I am using a DS3231 RTC and this example mentions the DS1307 and I suspect that there is a compatability problem.
I will continue my search to find a compatible DST program/code.

That should not give you the error of the file missing. Can you successfully compile the example that comes with the DST_RTC library?

I will give that a try a bit later on. I suspect that there is a software conflict due to the RTC that I am using.

You're getting compiler errors. The compiler knows nothing of the hardware you have. All it knows are the files you've asked it to compile.

Fix this first, then attack the rest of the compiler messages:

This is the error, not the EEPROM library

Right.

Thank you for all the suggestions. I found that there were some typos which have been corrected.
This is the current version of the sketch.

// Author : John Marchant G0RJM
// Created : 25/01/2024
// Description : A project to display the current date, time and temperature on the 20x4 LCD screen
// and create a thermostatic heating control of three zones to include frost protection.
// This has been based on the RTClib ds3231 example along with many parts borrowed
// from several other files/sketches and in collaboration with several authors from the
// Arduino Forum in particular blh64, StefanL38 and UKHeliBob.

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include "RTClib.h"
#include <OneWire.h>
#include <DallasTemperature.h>
#include "DST_RTC.h"
#include <EEPROM.h>

#define ONE_WIRE_BUS_1 3
#define ONE_WIRE_BUS_2 4
#define ONE_WIRE_BUS_3 5

OneWire oneWire_range(ONE_WIRE_BUS_1);
OneWire oneWire_club(ONE_WIRE_BUS_2);
OneWire oneWire_airgun(ONE_WIRE_BUS_3);

const byte range_relay = 9;  // Relay outputs
const byte club_relay = 10;
const byte airgun_relay = 11;
const byte boiler_relay = 12;

float range_temperature;
float club_temperature;
float airgun_temperature;

const float temperature_setpoint_range = 22.0;   // C
const float temperature_setpoint_club = 22.0;    // C
const float temperature_setpoint_airgun = 22.0;  // C
const float frost_setpoint = 22.0;               // C
const float deadzone = 1.0;                      // C

const int SCREEN_ON_TIME = 30000;
const int backlight_buttonPin = 8;
int buttonState = 0;
unsigned long currentMillis = 0;
unsigned long previousMillisScreen = 0;
bool screenOn = false;

DallasTemperature sensor_range(&oneWire_range);
DallasTemperature sensor_club(&oneWire_club);
DallasTemperature sensor_airgun(&oneWire_airgun);

enum { SUNDAY,
       MONDAY,
       TUESDAY,
       WEDNESDAY,
       THURSDAY,
       FRIDAY,
       SATURDAY };

const int On_Normal = 16 * 60UL + 00;   // 16:00
const int Off_Normal = 21 * 60UL + 30;  // 21:30
const int On_Sunday = 12 * 60UL + 00;   // 12:00 for Sundays
const int Off_Sunday = 17 * 60UL + 30;  // 17:30 for Sundays

#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
// Required for Serial on Zero based boards
#define Serial SERIAL_PORT_USBVIRTUAL
#endif

LiquidCrystal_I2C lcd(0X27, 20, 4);
RTC_DS3231 rtc;   // clock object
DST_RTC dst_rtc;  // DST object

// Define US or EU rules for DST comment out as required. More countries could be added with different rules in DST_RTC.cpp
// const char rulesDST[] = "US"; // US DST rules
const char rulesDST[] = "EU";  // EU DST rules

char daysOfTheWeek[7][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
byte char_temp[8] = { B00100, B01010, B01010, B01110, B01110, B11111, B11111, B01110 };  // for thermometer icon

void setup() {

  pinMode(range_relay, OUTPUT);
  pinMode(club_relay, OUTPUT);
  pinMode(airgun_relay, OUTPUT);
  pinMode(boiler_relay, OUTPUT);
  pinMode(backlight_buttonPin, INPUT);

  rtc.begin();
  lcd.init();
  lcd.backlight();
  lcd.createChar(0, char_temp);
  lcd.setCursor(4, 0);
  lcd.print("Take it easy!");
  lcd.setCursor(4, 1);
  lcd.print("Working on it");
  lcd.setCursor(2, 2);
  lcd.print("G0RJM Three Zone");
  lcd.setCursor(1, 3);
  lcd.print("Temperature Control");
  delay(1000);
  lcd.clear();
  if (rtc.lostPower()) {
    // When the time needs to be set up on a new device, or after a power loss, uncomment the
    // following line. This sets the RTC to the date & time this sketch was compiled
    // rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }
  /*
    This line sets the RTC with an explicit date & time (standard time - not DST), for example to set
    March 28, 2020 at 23:58:5 you would call:
    // rtc.adjust(DateTime(2020, 3, 28, 23, 58, 5));
    If used load the sketch a second time with this line commented out or the RTC will reset to
    this time on power up or reset.
  */

  Serial.begin(115200);
  Serial.println("G0RJM Three zone Temperature Control");

  Wire.begin();

  sensor_range.begin();
  sensor_club.begin();
  sensor_airgun.begin();

  if (! rtc.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(__DATE__, __TIME__));
    // DST? If we're in it, let's subtract an hour from the RTC time to keep our DST calculation correct. This gives us
    // Standard Time which our DST check will add an hour back to if we're in DST.
    DateTime standardTime = rtc.now();
    if (dst_rtc.checkDST(standardTime) == true) {  // check whether we're in DST right now. If we are, subtract an hour.
      standardTime = standardTime.unixtime() - 3600;
    }
    rtc.adjust(standardTime);
  }
}

//--------------------------Timeswitch Control---------------------------//
void loop() {

  DateTime now = rtc.now();
  int currentTime = now.hour() * 60UL + now.minute();

  bool isHeatOn;  // true = heating time

  //------------------------Daylight Saving Setting=---------------------//
  {
    DateTime standardTime = rtc.now();

    Serial.println("Standard Time");
    printTheTime(standardTime);

    DateTime theTime = dst_rtc.calculateTime(standardTime);  // takes into account DST

    Serial.println("time adjusted for Daylight Saving Time");
    printTheTime(theTime);

    delay(1000);  // 1 second
  }




  //----------------------Timed heating setting-------------------------//
  if (now.dayOfTheWeek() != SUNDAY) {
    // Monday to saturday so use normal times
    if (currentTime < On_Normal || currentTime > Off_Normal) {
      // outside normal heating time
      isHeatOn = false;
    } else {
      // within normal heating time
      isHeatOn = true;
    }
  } else {
    // Sunday times
    if (currentTime < On_Sunday || currentTime > Off_Sunday) {
      // outside normal heating time
      isHeatOn = false;
    } else {
      // within normal heating time
      isHeatOn = true;
    }
  }

  if (isHeatOn) {
    Serial.println("Normal Heating ");
    NormalTemperature();
  } else {
    Serial.println("Frost Prevention  ");
    FrostPrevention();
  }

  // ------------------------Backlight display----------------------------//

  buttonState = digitalRead(backlight_buttonPin);

  if (buttonState == HIGH) {
    previousMillisScreen = millis();
    lcd.backlight();
    screenOn = true;
  }
  // if time passed above SCREEN_ON_TIME after we turned it on
  if ((buttonState == LOW) && (millis() - previousMillisScreen >= SCREEN_ON_TIME)) {
    lcd.noBacklight();
    screenOn = false;
    Serial.println("Backlight OFF");
  }

  if ((screenOn) && (millis() - previousMillisScreen >= SCREEN_ON_TIME)) {
    lcd.noBacklight();
    screenOn = false;
    Serial.println("Backlight OFF");
  }

  //--------------------------Date display------------------------------//
  lcd.setCursor(0, 0);
  lcd.print(daysOfTheWeek[now.dayOfTheWeek()]);
  lcd.setCursor(3, 0);
  lcd.print(":");
  lcd.setCursor(4, 0);
  if (now.day() < 10) lcd.print('0');
  lcd.print(now.day(), DEC);
  lcd.print(':');
  if (now.month() < 10) lcd.print('0');
  lcd.print(now.month(), DEC);
  lcd.print(':');
  lcd.print(now.year(), DEC);

  //-------------------------Time display-------------------------------//
  lcd.setCursor(15, 0);
  if (now.hour() < 10) lcd.print('0');
  lcd.print(now.hour(), DEC);
  lcd.print(':');
  if (now.minute() < 10) lcd.print('0');
  lcd.print(now.minute(), DEC);

  //-----------------------Temperature display - -----------------------//
  lcd.setCursor(0, 1);  // Range
  lcd.print("Range: ");
  lcd.print(sensor_range.getTempCByIndex(0));

  lcd.setCursor(12, 1);
  lcd.write((char)223);
  lcd.print('C');

  lcd.setCursor(0, 2);  // Clubroom
  lcd.print("Club:  ");
  lcd.print(sensor_club.getTempCByIndex(0));

  lcd.setCursor(12, 2);
  lcd.write((char)223);
  lcd.print('C');

  lcd.setCursor(0, 3);  // Airgun Range
  lcd.print("Airgun:");
  lcd.print(sensor_airgun.getTempCByIndex(0));

  lcd.setCursor(12, 3);
  lcd.write((char)223);
  lcd.print('C');

  //---------------------------Serial print-----------------------------//
  Serial.print(now.day(), DEC);
  Serial.print('/');
  Serial.print(now.month(), DEC);
  Serial.print(" (");
  Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
  Serial.print(") ");
  Serial.print("Requesting temperatures...");
  sensor_range.requestTemperatures();
  sensor_club.requestTemperatures();
  sensor_airgun.requestTemperatures();
  Serial.println(" done");
  Serial.print("Range: ");
  Serial.println(sensor_range.getTempCByIndex(0));
  Serial.print("Club: ");
  Serial.println(sensor_club.getTempCByIndex(0));
  Serial.print("Airgun: ");
  Serial.println(sensor_airgun.getTempCByIndex(0));

  delay(1000);
}
//------------------------Daylight saving control-----------------------//
// print time to serial
void printTheTime(DateTime theTimeP) {

  Serial.print(theTimeP.year(), DEC);
  Serial.print('/');
  Serial.print(theTimeP.month(), DEC);
  Serial.print('/');
  Serial.print(theTimeP.day(), DEC);
  Serial.print(' ');
  Serial.print(theTimeP.hour(), DEC);
  Serial.print(':');
  Serial.print(theTimeP.minute(), DEC);
  Serial.print(':');
  Serial.print(theTimeP.second(), DEC);
  Serial.println();
}

And this is the error message.


FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal I2C@1.1.2]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal I2C@1.1.2]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for RTClib.h: [RTClib@2.1.3]
ResolveLibrary(RTClib.h)
  -> candidates: [RTClib@2.1.3]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for Adafruit_I2CDevice.h: [Adafruit BusIO@1.15.0]
ResolveLibrary(Adafruit_I2CDevice.h)
  -> candidates: [Adafruit BusIO@1.15.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for OneWire.h: [OneWire@2.3.7]
ResolveLibrary(OneWire.h)
  -> candidates: [OneWire@2.3.7]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for DallasTemperature.h: [MAX31850 DallasTemp@1.1.6 DallasTemperature@3.9.0]
ResolveLibrary(DallasTemperature.h)
  -> candidates: [MAX31850 DallasTemp@1.1.6 DallasTemperature@3.9.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for DST_RTC.h: [DST RTC@1.1.1]
ResolveLibrary(DST_RTC.h)
  -> candidates: [DST RTC@1.1.1]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature -Ic:\Users\johnm\Documents\Arduino\libraries\DST_RTC C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Alternatives for EEPROM.h: [EEPROM@2.0]
ResolveLibrary(EEPROM.h)
  -> candidates: [EEPROM@2.0]
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature -Ic:\Users\johnm\Documents\Arduino\libraries\DST_RTC -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o nul
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp
Using cached library dependencies for file: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\Wire.cpp
Using cached library dependencies for file: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility\twi.c
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTC_DS1307.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTC_DS3231.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTC_Micros.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTC_Millis.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTC_PCF8523.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTC_PCF8563.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\RTClib\src\RTClib.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\OneWire\OneWire.cpp
Using cached library dependencies for file: c:\Users\johnm\Documents\Arduino\libraries\DallasTemperature\DallasTemperature.cpp
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature -Ic:\Users\johnm\Documents\Arduino\libraries\DST_RTC -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src c:\Users\johnm\Documents\Arduino\libraries\DST_RTC\DST_RTC.cpp -o nul
Using cached library dependencies for file: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp
Generating function prototypes...
C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\johnm\Documents\Arduino\libraries\RTClib\src -Ic:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO -Ic:\Users\johnm\Documents\Arduino\libraries\OneWire -Ic:\Users\johnm\Documents\Arduino\libraries\DallasTemperature -Ic:\Users\johnm\Documents\Arduino\libraries\DST_RTC -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src -IC:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src C:\Users\johnm\AppData\Local\Temp\arduino\sketches\96DFED36EB631C459DC15A354B23E126\sketch\Three_zone_heating_controller_V1.2.7.ino.cpp -o C:\Users\johnm\AppData\Local\Temp\20344875\sketch_merged.cpp
C:\Users\johnm\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\johnm\AppData\Local\Temp\20344875\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\johnm\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\johnm\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\johnm\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "-Ic:\\Users\\johnm\\Documents\\Arduino\\libraries\\LiquidCrystal_I2C" "-IC:\\Users\\johnm\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\Wire\\src" "-Ic:\\Users\\johnm\\Documents\\Arduino\\libraries\\RTClib\\src" "-Ic:\\Users\\johnm\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-Ic:\\Users\\johnm\\Documents\\Arduino\\libraries\\OneWire" "-Ic:\\Users\\johnm\\Documents\\Arduino\\libraries\\DallasTemperature" "-Ic:\\Users\\johnm\\Documents\\Arduino\\libraries\\DST_RTC" "-IC:\\Users\\johnm\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\EEPROM\\src" "-IC:\\Users\\johnm\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\SPI\\src" "C:\\Users\\johnm\\AppData\\Local\\Temp\\arduino\\sketches\\96DFED36EB631C459DC15A354B23E126\\sketch\\Three_zone_heating_controller_V1.2.7.ino.cpp" -o "C:\\Users\\johnm\\AppData\\Local\\Temp\\arduino\\sketches\\96DFED36EB631C459DC15A354B23E126\\sketch\\Three_zone_heating_controller_V1.2.7.ino.cpp.o"
C:\Users\johnm\Documents\Arduino\Three_zone_heating_controller_V1.2.7\Three_zone_heating_controller_V1.2.7.ino: In function 'void setup()':
C:\Users\johnm\Documents\Arduino\Three_zone_heating_controller_V1.2.7\Three_zone_heating_controller_V1.2.7.ino:124:13: error: 'class RTC_DS3231' has no member named 'isrunning'
   if (! rtc.isrunning()) {
             ^~~~~~~~~
Multiple libraries were found for "DallasTemperature.h"
  Used: C:\Users\johnm\Documents\Arduino\libraries\DallasTemperature
  Not used: C:\Users\johnm\Documents\Arduino\libraries\MAX31850_DallasTemp
Using library LiquidCrystal I2C at version 1.1.2 in folder: C:\Users\johnm\Documents\Arduino\libraries\LiquidCrystal_I2C 
Using library Wire at version 1.0 in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire 
Using library RTClib at version 2.1.3 in folder: C:\Users\johnm\Documents\Arduino\libraries\RTClib 
Using library Adafruit BusIO at version 1.15.0 in folder: C:\Users\johnm\Documents\Arduino\libraries\Adafruit_BusIO 
Using library OneWire at version 2.3.7 in folder: C:\Users\johnm\Documents\Arduino\libraries\OneWire 
Using library DallasTemperature at version 3.9.0 in folder: C:\Users\johnm\Documents\Arduino\libraries\DallasTemperature 
Using library DST RTC at version 1.1.1 in folder: C:\Users\johnm\Documents\Arduino\libraries\DST_RTC 
Using library EEPROM at version 2.0 in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM 
Using library SPI at version 1.0 in folder: C:\Users\johnm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI 
exit status 1

Compilation error: 'class RTC_DS3231' has no member named 'isrunning'

I have checked the Andy Doro example which compiles with no problem. I have to presume that there must be a conflict with others parts of my sketch. Your guidance would be most appreciated.

Doesn't the error message seem pretty straight forward?

You declared an object of class RTC_DS3231 and then tried to call a member function .isrunning() which doesn't exist.

It does exist for the RTC_DS1307 class, but that is not what you are using.

It does have the .lostPower() function so you could use that to see if you need to set the time to the compile time or not.

Thanks again @blh64. That has solved that error. I have now got the sketch compiling.
I have now found that when I set the correct time etc and then unplug the usb cable and then re plug it in, that although the backup battery in the RTC is operational, the time display is turned back by 1 hour. Each unplug and replug of the usb sets the time further back by 1 hour.
I presume this could be the code recognising overall power failure, despite the presence of the battery in the RTC.
I will need to give this a bit more thought when next working on the sketch.
As usual any suggestions would be most appreciated.

You would have to show your code. Are you getting a message on the Serial monitor every time you plug it in that the RTC is not running? That should only happen the very first time you set up your RTC if the battery is installed.

Other than that, if you check for DST every time during startup, regardless of power loss, you will always keep subtracting off an hour. You can not just check the current RTC date- and then adjust it since you only want to do that adjustment 1 time. You could do something along the lines of storing DST flag in EEPROM and then when you detect a difference between the EERPOM and the RTC calculation, adjust the RTC and update your EEPROM flag.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.