my code is not working

hi guys please give me some help, I am forever trying to improve my grow room and I now have changed my sensor to a bme 280 and I am controlling my light fan and humdifer at the same timw, my code however does not want to work

 #include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <DS3231.h>
LiquidCrystal_I2C lcd(0X27, 2, 1, 0, 4, 5, 6, 7); // 0x27 is the I2c bus for a unmodified back pack
int Light = 3;
const byte RelayPin = 5;


DS3231  rtc(SDA, SCL);
Time ti;

const int OnHour1[] = {6};
const int OnMin1 [] = {0};
const int OffHour1[] = {6};
const int OffMin1[] = {0};
const byte OnHour[] = {12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
const byte OnMin[] = {0, 1, 3, 5, 7, 9};
const byte OffHour[] = {12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
const byte OffMin[] = {2, 4, 6, 8, 10};
//humidity control points
#define SETPOINT 90.0
#define DEADBAND 2.0

//These just make code easier to read
#define HUMIDIFIER 9 //instead of using 9 for pin 9 we will name it HUMIDIFIER
#define FAN 4
#define ON false
//the relay is sort of backwards. a low/0/false output is actually on
#define OFF true    //the relay is sort of backwards. a high/1/true output is actually on
Adafruit_BME280 bme;



//the setup routine only executes once, when the ardunio is powered on


void setup() {
  bme.begin();
  rtc.begin();
  pinMode(Light, OUTPUT);
  digitalWrite(Light, LOW);
  pinMode(RelayPin, OUTPUT);
  digitalWrite(RelayPin, LOW);
  pinMode (FAN, OUTPUT);
  pinMode(HUMIDIFIER, OUTPUT);
  digitalWrite(HUMIDIFIER, OFF);
  digitalWrite(FAN, OFF);
  //activate LCD module
  lcd.begin(16, 2);                     // for 16x2 LCD module
  lcd.setBacklightPin(3, POSITIVE);
  lcd.setBacklight(HIGH);


  //Print a message to the LCD.

  lcd.setCursor(0, 0);
  lcd.print("TEMP");
  lcd.setCursor(8, 0);
  lcd.print("FAN");
  lcd.setCursor(0, 1);
  lcd.print("RH");
  lcd.setCursor(8, 1);
  lcd.print("LAMP");
}

bool isInByteList(byte value, const byte *array, byte length)
{
  for (byte i = 0; i < length; i++)
    if (array[i] == value)
      return true;


  return false;
}


void loop() {
  ti = rtc.getTime();
   delay (1000);
  if (isInByteList(ti.hour, OnHour, sizeof OnHour) && isInByteList(ti.min, OnMin, sizeof OnMin))
  {
    digitalWrite(RelayPin, LOW);
    Serial.println("FAN ON");
    lcd.setCursor(9, 0);
    lcd.print("ON");
  }
  else  if (isInByteList(ti.hour, OffHour, sizeof OffHour) && isInByteList(ti.min, OffMin, sizeof OffMin))
  {
    digitalWrite(RelayPin, HIGH);
    lcd.setCursor(9, 0);
    lcd.print("OFF");
  }

  if (ti.hour == OnHour1 && ti.min == OnMin1)
  {
    digitalWrite(Light, LOW);
    lcd.setCursor(13, 1);
    lcd.print("0n");
  }
  else if (ti.hour == OffHour && ti.min == OffMin) 
  {
    digitalWrite(Light, HIGH);
    Serial.print("LIGHT OFF");
    lcd.setCursor(13, 1);
    lcd.print("OFF");
  }




  //Read the temperature and humidity into floating point variables

  float h = bme.readHumidity();
  float t = bme.readTemperature();

  //Move the cursor to the end of the word temp: and print the reading to 2 decimal places
  lcd.setCursor(5, 0);
  lcd.print(t, 2);
  //Move the cursor to the end of the word Humidity: and print the reading to 2 decimal places
  lcd.setCursor(4, 1);
  lcd.print(h, 2);



  //Now begin with the control logic
  if (digitalRead(HUMIDIFIER) == ON)

  {
    //If the humidifier is on, check to see if the humidity is above set point
    if (h > SETPOINT + DEADBAND)


      //we've reached the upper limit, so kill the humidifier
      digitalWrite(HUMIDIFIER, OFF);
    digitalWrite(FAN, ON);


  }
  else
  {
    // If the humidifier is off, check to see if humidity is below setpoint
    if (h < SETPOINT - DEADBAND)

      // We've reached the lower limit, so kiick on the humidifier
      digitalWrite(HUMIDIFIER, ON);
    digitalWrite(FAN, OFF);

  }}

Help us give better advice by telling us what's going wrong. Does it compile? Does it do something you don't want? What did you want it to do?

hi sorry, yes it compiles and uploads to the board however nothing is working, it prints the words to the display but no figures come up at all

I want it to control humidity at a set point of 90 percent, secondly it needs to put a fan on for 15 min and off for 15 min, thirdly it must put a light on at 6am and off at 6pm, and I need the display to give me temp humidity readings, and fan and light status as on or off

Mushroom_man:
I want it to control humidity at a set point of 90 percent, secondly it needs to put a fan on for 15 min and off for 15 min, thirdly it must put a light on at 6am and off at 6pm, and I need the display to give me temp humidity readings, and fan and light status as on or off

The key to software development is to divide and conquer. Have you gotten all the functions to work individually? If so, start with a simple program and add the functions back one at a time. Test after every change. When it stops working, you'll know that the last thing you did is what broke it. Fix that and continue.

Doesn't compile for me: loads of errors about constructor candidates, functions not defined, types not valid. Different library versions I expect.

Since it compiles for you, strip it down to something that just grabs the temperature and humidity and prints them to the Serial port. Build up from there, with plenty of debugging prints.

great thanks, I have just started to do that