timer relayPin on 10s off 30min please help

I need to add a code for relay pin ,but dont understand millis.

relayPin is digital pin 13 relay need to be 10s on then 30min off and repeat.
This relayPin only work when int t1 is on 18,15 to 6,00.

// these arrays store timer data
// on hour, on minute, off hour, off minute
int t1[4]= {
18,15,6,00};
int t2[4]= {
18,15,6,10};

#define relayPin = 13

this is code a have so far

#include "DHT.h"
#include <LiquidCrystal.h>
#include <Wire.h>
#include "RTClib.h"

// these arrays store timer data
// on hour, on minute, off hour, off minute
int t1[4]= {
  18,15,6,00};
int t2[4]= {
  18,15,6,10};

#define DHTPIN 7     // what pin we're connected to
#define tempcontpin 8 // temp output to control
#define humcontpin 9 // humidity output to control 
#define timer1pin  6   // timer1 output to control lights
#define timer2pin  10   //timer2 output to control light-hood fan
#define DHTTYPE DHT22   // DHT 22  (AM2302)
RTC_DS1307 RTC; // define the Real Time Clock object

int maxT=0, minT=100;
int maxH=0, minH=100;
LiquidCrystal lcd(12,11,5,4,3,2);
DHT dht(DHTPIN, DHTTYPE);

//here is where the temp and hum setpoints are changed
int tempset=24, tempreset=22;
int humset=60,  humreset=55;
int tmem=0, hmem=0;


void setup() {
  Serial.begin(9600); 
  
   // connect to RTC
  Wire.begin();  
  RTC.begin();

  if (!RTC.isrunning()) {

    Serial.println("RTC is not running");
    }

  Serial.println("DHTxx test!");
 
  dht.begin();
  
  lcd.begin(16, 2); // Set the display to 16 columns and 2 rows
  lcd.clear();
  
  //setup LEDs or output
  pinMode(tempcontpin, OUTPUT);
  pinMode(humcontpin, OUTPUT);
  pinMode(timer1pin, OUTPUT);
  pinMode(timer2pin, OUTPUT);

}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  // check if returns are valid, if they are NaN (not a number) then something went wrong!
  if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.print("Humidity: "); 
    Serial.print(h);
    Serial.print(" %\t");
    Serial.print("Temperature: "); 
    Serial.print(t);
    Serial.println(" *C");
    lcd.setCursor(0,0);
        lcd.print("T");
        lcd.print(t);
      	lcd.write(B11011111); // print degree symbol
  	lcd.print("C ");
        lcd.setCursor(0,1);
        lcd.print("H");
        lcd.print(h);
        lcd.print("%");
  	if (t>maxT) {maxT=t;}  //check for max temp
  	if (t<minT) {minT=t;}  //check for min temp
        lcd.setCursor(9,0);
        lcd.print("Max");
        lcd.print(maxT);
        lcd.write(B11011111);
        lcd.print("C");
  	
        if (h>maxH)  {maxH=h;}  //check for max hum
        if (h<minH)  {minH=h;}  //check for min hum
        lcd.setCursor(9,1);
  	lcd.print("Max");
  	lcd.print(maxH);
  	lcd.print("%");
  	}
  DateTime now = RTC.now();

  //Serial.print(now.unixtime()); // seconds since 1/1/1970
  //Serial.print(", ");
  Serial.print('"');
  Serial.print(now.year(), DEC);
  Serial.print("/");
  Serial.print(now.month(), DEC);
  Serial.print("/");
  Serial.print(now.day(), DEC);
  Serial.print(" ");
  Serial.print(now.hour(), DEC);
  Serial.print(":");
  Serial.print(now.minute(), DEC);
  Serial.print(":");
  Serial.print(now.second(), DEC);
  Serial.print('"');
  Serial.println();
     
  // check for timer1 on/off
  {
    if (now.hour()==t1[0] && now.minute()==t1[1])
    {
      digitalWrite (6, HIGH); 
    }
    if (now.hour()==t1[2] && now.minute()==t1[3])
    {
      digitalWrite (6, LOW);
    } 
  }


  // check for timer2 on/off

  {
    if ((now.hour()==t2[0] && now.minute()==t2[1])) 
       {  
         digitalWrite (10, HIGH);
    }
    if (now.hour()==t2[2] && now.minute()==t2[3])
   
    {
      digitalWrite (10, LOW);
    }
  }

   //Here is the section for control with hysterisis
  
   if (tempreset<=t && t<=tempset && tmem==1) {
     digitalWrite (8, HIGH);
   }
   if (t>=tempset) {
     tmem=1,
     digitalWrite (8, HIGH);
   }
   if (t<=tempreset) {
     tmem==0,
     digitalWrite (8,LOW);
   }
   
   if (humreset<=h && h<=humset && hmem==1) {
     digitalWrite (9, HIGH);
   }
   if (h>humset) {
     hmem==1,
     digitalWrite (9, HIGH);
   }
   if (h<humreset) {
     hmem==0;
     digitalWrite (9, LOW);
   }
}
 if (h>humset) {
    hmem==1,
    digitalWrite (9, HIGH);
  }

http://www.gammon.com.au/forum/?id=12153#trap3

You have that in multiple places.

Tnx for your help.
I have never programmed and difficult to learn this but progress is slow.
Sorry i know that i did not explain well what i need.
I need to chance this

int RelayPin = 12;
// Relay connected to transistor on pin 12
void setup()
{
pinMode(RelayPin, OUTPUT);
}
void loop()
{
digitalWrite(RelayPin, HIGH); // activates the relay
delay(10000); // waits for 10 second
digitalWrite(RelayPin, LOW); // deactivates the relay
delay(1800000); // waits for 30 min 
}

That i can then insert in the code below.
I think that i need use millis , but i do not understant how so please help.

#include "DHT.h"
#include <LiquidCrystal.h>
#include <Wire.h>
#include "RTClib.h"

// these arrays store timer data
// on hour, on minute, off hour, off minute
int t1[4]= {
  18,15,6,00};
int t2[4]= {
  18,15,6,10};

#define DHTPIN 7     // what pin we're connected to
#define tempcontpin 8 // temp output to control
#define humcontpin 9 // humidity output to control 
#define timer1pin  6   // timer1 output to control lights
#define timer2pin  10   //timer2 output to control light-hood fan
#define DHTTYPE DHT22   // DHT 22  (AM2302)
RTC_DS1307 RTC; // define the Real Time Clock object

int maxT=0, minT=100;
int maxH=0, minH=100;
LiquidCrystal lcd(12,11,5,4,3,2);
DHT dht(DHTPIN, DHTTYPE);

//here is where the temp and hum setpoints are changed
int tempset=24, tempreset=22;
int humset=60,  humreset=55;
int tmem=0, hmem=0;


void setup() {
  Serial.begin(9600); 
  
   // connect to RTC
  Wire.begin();  
  RTC.begin();

  if (!RTC.isrunning()) {

    Serial.println("RTC is not running");
    }

  Serial.println("DHTxx test!");
 
  dht.begin();
  
  lcd.begin(16, 2); // Set the display to 16 columns and 2 rows
  lcd.clear();
  
  //setup LEDs or output
  pinMode(tempcontpin, OUTPUT);
  pinMode(humcontpin, OUTPUT);
  pinMode(timer1pin, OUTPUT);
  pinMode(timer2pin, OUTPUT);

}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  // check if returns are valid, if they are NaN (not a number) then something went wrong!
  if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.print("Humidity: "); 
    Serial.print(h);
    Serial.print(" %\t");
    Serial.print("Temperature: "); 
    Serial.print(t);
    Serial.println(" *C");
    lcd.setCursor(0,0);
        lcd.print("T");
        lcd.print(t);
      	lcd.write(B11011111); // print degree symbol
  	lcd.print("C ");
        lcd.setCursor(0,1);
        lcd.print("H");
        lcd.print(h);
        lcd.print("%");
  	if (t>maxT) {maxT=t;}  //check for max temp
  	if (t<minT) {minT=t;}  //check for min temp
        lcd.setCursor(9,0);
        lcd.print("Max");
        lcd.print(maxT);
        lcd.write(B11011111);
        lcd.print("C");
  	
        if (h>maxH)  {maxH=h;}  //check for max hum
        if (h<minH)  {minH=h;}  //check for min hum
        lcd.setCursor(9,1);
  	lcd.print("Max");
  	lcd.print(maxH);
  	lcd.print("%");
  	}
  DateTime now = RTC.now();

  //Serial.print(now.unixtime()); // seconds since 1/1/1970
  //Serial.print(", ");
  Serial.print('"');
  Serial.print(now.year(), DEC);
  Serial.print("/");
  Serial.print(now.month(), DEC);
  Serial.print("/");
  Serial.print(now.day(), DEC);
  Serial.print(" ");
  Serial.print(now.hour(), DEC);
  Serial.print(":");
  Serial.print(now.minute(), DEC);
  Serial.print(":");
  Serial.print(now.second(), DEC);
  Serial.print('"');
  Serial.println();
     
  // check for timer1 on/off
  {
    if (now.hour()==t1[0] && now.minute()==t1[1])
    {
      digitalWrite (6, HIGH); 
    }
    if (now.hour()==t1[2] && now.minute()==t1[3])
    {
      digitalWrite (6, LOW);
    } 
  }


  // check for timer2 on/off

  {
    if ((now.hour()==t2[0] && now.minute()==t2[1])) 
       {  
         digitalWrite (10, HIGH);
    }
    if (now.hour()==t2[2] && now.minute()==t2[3])
   
    {
      digitalWrite (10, LOW);
    }
  }

   //Here is the section for control with hysterisis
  
   if (tempreset<=t && t<=tempset && tmem==1) {
     digitalWrite (8, HIGH);
   }
   if (t>=tempset) {
     tmem=1,
     digitalWrite (8, HIGH);
   }
   if (t<=tempreset) {
     tmem==0,
     digitalWrite (8,LOW);
   }
   
   if (humreset<=h && h<=humset && hmem==1) {
     digitalWrite (9, HIGH);
   }
   if (h>humset) {
     hmem==1,
     digitalWrite (9, HIGH);
   }
   if (h<humreset) {
     hmem==0;
     digitalWrite (9, LOW);
   }
}

But this RelayPin operates only when the ¨int t1¨ is on

I hope it is more understandable

But this RelayPin operates only when the ¨int t1¨ is on

You don't have an "int t1". You have an array of ints, called t1.

Therefore, the "only when int t1 is on" makes no sense.

I hope it is more understandable

It is not.

PaulS:

But this RelayPin operates only when the ¨int t1¨ is on

You don’t have an “int t1”. You have an array of ints, called t1.

Therefore, the “only when int t1 is on” makes no sense.

I hope it is more understandable

It is not.

ok forget this
first step is to change this

int RelayPin = 12;
// Relay connected to transistor on pin 12
void setup()
{
pinMode(RelayPin, OUTPUT);
}
void loop()
{
digitalWrite(RelayPin, HIGH); // activates the relay
delay(10000); // waits for 10 second
digitalWrite(RelayPin, LOW); // deactivates the relay
delay(1800000); // waits for 30 min 
}

that i can then insert in this

#include "DHT.h"
#include <LiquidCrystal.h>
#include <Wire.h>
#include "RTClib.h"

// these arrays store timer data
// on hour, on minute, off hour, off minute
int t1[4]= {
  18,15,6,00};
int t2[4]= {
  18,15,6,10};

#define DHTPIN 7     // what pin we're connected to
#define tempcontpin 8 // temp output to control
#define humcontpin 9 // humidity output to control 
#define timer1pin  6   // timer1 output to control lights
#define timer2pin  10   //timer2 output to control light-hood fan
#define DHTTYPE DHT22   // DHT 22  (AM2302)
RTC_DS1307 RTC; // define the Real Time Clock object

int maxT=0, minT=100;
int maxH=0, minH=100;
LiquidCrystal lcd(12,11,5,4,3,2);
DHT dht(DHTPIN, DHTTYPE);

//here is where the temp and hum setpoints are changed
int tempset=24, tempreset=22;
int humset=60,  humreset=55;
int tmem=0, hmem=0;


void setup() {
  Serial.begin(9600); 
  
   // connect to RTC
  Wire.begin();  
  RTC.begin();

  if (!RTC.isrunning()) {

    Serial.println("RTC is not running");
    }

  Serial.println("DHTxx test!");
 
  dht.begin();
  
  lcd.begin(16, 2); // Set the display to 16 columns and 2 rows
  lcd.clear();
  
  //setup LEDs or output
  pinMode(tempcontpin, OUTPUT);
  pinMode(humcontpin, OUTPUT);
  pinMode(timer1pin, OUTPUT);
  pinMode(timer2pin, OUTPUT);

}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  // check if returns are valid, if they are NaN (not a number) then something went wrong!
  if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.print("Humidity: "); 
    Serial.print(h);
    Serial.print(" %\t");
    Serial.print("Temperature: "); 
    Serial.print(t);
    Serial.println(" *C");
    lcd.setCursor(0,0);
        lcd.print("T");
        lcd.print(t);
      	lcd.write(B11011111); // print degree symbol
  	lcd.print("C ");
        lcd.setCursor(0,1);
        lcd.print("H");
        lcd.print(h);
        lcd.print("%");
  	if (t>maxT) {maxT=t;}  //check for max temp
  	if (t<minT) {minT=t;}  //check for min temp
        lcd.setCursor(9,0);
        lcd.print("Max");
        lcd.print(maxT);
        lcd.write(B11011111);
        lcd.print("C");
  	
        if (h>maxH)  {maxH=h;}  //check for max hum
        if (h<minH)  {minH=h;}  //check for min hum
        lcd.setCursor(9,1);
  	lcd.print("Max");
  	lcd.print(maxH);
  	lcd.print("%");
  	}
  DateTime now = RTC.now();

  //Serial.print(now.unixtime()); // seconds since 1/1/1970
  //Serial.print(", ");
  Serial.print('"');
  Serial.print(now.year(), DEC);
  Serial.print("/");
  Serial.print(now.month(), DEC);
  Serial.print("/");
  Serial.print(now.day(), DEC);
  Serial.print(" ");
  Serial.print(now.hour(), DEC);
  Serial.print(":");
  Serial.print(now.minute(), DEC);
  Serial.print(":");
  Serial.print(now.second(), DEC);
  Serial.print('"');
  Serial.println();
     
  // check for timer1 on/off
  {
    if (now.hour()==t1[0] && now.minute()==t1[1])
    {
      digitalWrite (6, HIGH); 
    }
    if (now.hour()==t1[2] && now.minute()==t1[3])
    {
      digitalWrite (6, LOW);
    } 
  }


  // check for timer2 on/off

  {
    if ((now.hour()==t2[0] && now.minute()==t2[1])) 
       {  
         digitalWrite (10, HIGH);
    }
    if (now.hour()==t2[2] && now.minute()==t2[3])
   
    {
      digitalWrite (10, LOW);
    }
  }

   //Here is the section for control with hysterisis
  
   if (tempreset<=t && t<=tempset && tmem==1) {
     digitalWrite (8, HIGH);
   }
   if (t>=tempset) {
     tmem=1,
     digitalWrite (8, HIGH);
   }
   if (t<=tempreset) {
     tmem==0,
     digitalWrite (8,LOW);
   }
   
   if (humreset<=h && h<=humset && hmem==1) {
     digitalWrite (9, HIGH);
   }
   if (h>humset) {
     hmem==1,
     digitalWrite (9, HIGH);
   }
   if (h<humreset) {
     hmem==0;
     digitalWrite (9, LOW);
   }
}

Can you help me with that?