cycle timer + lcd

hi guys,
i just need a little help :slight_smile:
i’m a beginner, just learning arduino
I tried to implement a project that many people share on the internet, I started with a small project

i found a project on this site http://www.instructables.com/id/Arduino-Repeat-Cycle-Timer/

this is the sketch

const int relayPin = 11;
unsigned int relayState = LOW;
long offTime = 11000;
long onTime = 9000;
unsigned long previousMillis=0;
void setup() {

// put your setup code here, to run once:
pinMode(relayPin, OUTPUT);
relayState = LOW;
digitalWrite(relayPin, LOW);

}
void loop() {

// put your main code here, to run repeatedly:
long currentMillis = millis();
if ((relayState==HIGH)&&(currentMillis-previousMillis>=offTime))
{

relayState = LOW;// turn it on
previousMillis = currentMillis; // Remember the time
digitalWrite(relayPin, LOW); // Update the actual relay
}
else if((relayState==LOW)&&(currentMillis-previousMillis>=onTime))
{

//digitalWrite(RELAY2, LOW);
relayState=HIGH; // Turn it off
previousMillis = currentMillis; // Remember the time
digitalWrite(relayPin, HIGH); // Update the actual relay
}
}

and than i try to modify by adding lcd but the text didn’t show up

this is the modified sketch . .

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

const int relayPin = 11;
unsigned int relayState = LOW;
long offTime = 11000;
long onTime = 9000;
unsigned long previousMillis=0;
void setup() {

// put your setup code here, to run once:
pinMode(relayPin, OUTPUT);
relayState = LOW;
digitalWrite(relayPin, LOW);
rtc.begin();
Serial.begin(9600);
}
void loop() {

// put your main code here, to run repeatedly:
long currentMillis = millis();
if ((relayState==HIGH)&&(currentMillis-previousMillis>=offTime))
{
lcd.clear();
lcd.print(“ON”);
lcd.setCursor(0,1);
lcd.print(“ON”);
relayState = LOW;// turn it on
previousMillis = currentMillis; // Remember the time
digitalWrite(relayPin, LOW); // Update the actual relay
}
else if((relayState==LOW)&&(currentMillis-previousMillis>=onTime))
{
lcd.clear();
lcd.print(“OFF”);
lcd.setCursor(0,1);
lcd.print(“OFF”);
//digitalWrite(RELAY2, LOW);
relayState=HIGH; // Turn it off
previousMillis = currentMillis; // Remember the time
digitalWrite(relayPin, HIGH); // Update the actual relay
}
}