Stepper motor+ Lcd + relay + temperature sensor

I am a newbie in programming. I have searched alot but didnt come up with a solution to my problem. I am all these things together as mentioned in the title with arduino mega 2560. I have written a code, its not complete but for now i have encountered a problem which i dont know how get it right
Here is the code:

/*-----( Import needed libraries )-----*/
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <Stepper.h>

/*-----( Declare Constants )-----*/
/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 20 chars 4 line display
LiquidCrystal_I2C lcd(0x27,20,4);  
/*-----( Declare Variables )-----*/
float tempC;
int tempPin = A7;
int Relay1 = 43;
int Relay2 = 45;
//int Relay3 = 47;
//int Relay4 = 49;

//declare variables for the motor pins
int motorPin1 = 8;    // Blue   - 28BYJ48 pin 1
int motorPin2 = 9;    // Pink   - 28BYJ48 pin 2
int motorPin3 = 10;    // Yellow - 28BYJ48 pin 3
int motorPin4 = 11;    // Orange - 28BYJ48 pin 4
                        // Red    - 28BYJ48 pin 5 (VCC)

int motorSpeed = 1200;  //variable to set stepper speed
int count = 0;          // count of steps made
int countsperrev = 512; // number of steps per full revolution
int lookup[8] = {B01000, B01100, B00100, B00110, B00010, B00011, B00001, B01001};
//////////////////////////////////////////////////////////////////////////////

void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);
  pinMode(Relay1, OUTPUT);
  pinMode(Relay2, OUTPUT);
  //pinMode(Relay3, OUTPUT);
  //pinMode(Relay4, OUTPUT);
  
  //declare the motor pins as outputs
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
  
  lcd.init();                      // initialize the lcd 

  // Print our characters on the LCD
  lcd.backlight();  //Backlight ON if under program control
  lcd.setCursor(3,0);
  lcd.print("Welcome");
  delay(500);
  lcd.setCursor(0,1);
  lcd.print("Genset Control");
  delay(500);
  lcd.setCursor(0,2);
  lcd.print("==================");
  delay(2000);
  lcd.clear();
  lcd.setCursor(0,0); //Start at character 3 on line 0
  lcd.print("T W=");
  lcd.setCursor(10,0);
  lcd.print("T O=");
  //lcd.setCursor(0,2);
  //lcd.print("ABC");
  //lcd.setCursor(0,3);  
  //lcd.print("ABC");

}/*--(end setup )---*/


void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  {
    tempC = analogRead(tempPin);           //read the value from the sensor
    tempC = (5.0 * tempC * 100.0)/1024.0;  //convert the analog data to temperature
    Serial.print((byte)tempC);             //send the data to the computer
    lcd.setCursor(4,0);
    lcd.print(tempC);
    delay(1000);
    if (tempC < 26.00) {
      digitalWrite(Relay2, HIGH);
      digitalWrite(Relay1, LOW);
      clockwise(); }
    else {
      digitalWrite(Relay1, HIGH);
      digitalWrite(Relay2, LOW);
      anticlockwise(); }
    // when characters arrive over the serial port...
    if (Serial.available()) {
      // wait a bit for the entire message to arrive
      delay(100);
      // clear the screen
      lcd.clear();
      // read all the available characters
      while (Serial.available() > 0) {
        // display each character to the LCD
        lcd.write(Serial.read());
      }
    }
  }

}/* --(end main loop )-- */

//////////////////////////////////////////////////////////////////////////////
//set pins to ULN2003 high in sequence from 1 to 4
//delay "motorSpeed" between each pin setting (to determine speed)
void anticlockwise()
{
  for(int i = 0; i < 8; i++)
  {
    setOutput(i);
    delayMicroseconds(motorSpeed);
  }
}

void clockwise()
{
  for(int i = 7; i >= 0; i--)
  {
    setOutput(i);
    delayMicroseconds(motorSpeed);
  }
}

void setOutput(int out)
{
  digitalWrite(motorPin1, bitRead(lookup[out], 0));
  digitalWrite(motorPin2, bitRead(lookup[out], 1));
  digitalWrite(motorPin3, bitRead(lookup[out], 2));
  digitalWrite(motorPin4, bitRead(lookup[out], 3));
}


/* ( THE END ) */

You can see in the void loop there is a delay of 1000 before the “if” statement. This delay is for the temperature to refresh on the lcd after interval of 1000. the problem with this is that i want to let the stepper move in a direction until the condition is met but with this delay the stepper takes one step in one second which is very very slow. I have tried to remove the interval, the motor moves a little faster but the refresh rate of the temperature on the lcd is so quick that i cant read what is being displayed.

Please help me.

Have a look at the blink without delay example for clues on how to eliminate calls to "delay".

Thank you for your help. But as i mentioned earlier i am new to programming so if you would kindly implement it in the code and show it would be very helpful. I know its spoon feeding but i am still learning.

The blink without delay example has about four significant lines of code in it. Play with it; take it apart and put it back together - change the on and off times, set the frequency using a pot.

Yeah i took some time and finally got it right. thank you so much. you are great.