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 )----*/
  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.print("Genset Control");
  lcd.setCursor(0,0); //Start at character 3 on line 0
  lcd.print("T W=");
  lcd.print("T O=");

}/*--(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
    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
      // clear the screen
      // read all the available characters
      while (Serial.available() > 0) {
        // display each character to the LCD

}/* --(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++)

void clockwise()
  for(int i = 7; i >= 0; i--)

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.