Last stage debugging - Help !![SolveD]

Hello,

I did close up all serial comminication within the code.

Change the Switch button place to A2, analog pin, Enable pullup resistor on the pin as well.

All is working nicely as it should, still some fine tuning is needed please . .

I know that i did place a flag called ButtonRead, to activate my Swapmenu function, and after each 6 seconds the Controller will read that, explaining my delay in swapping display on my LCD. I did that, as what explained in the arduino tutorial when activating analog pins to act as digital, a delay should be implemented to avoit jitty and electrical noise in reading analog sensors. Any approach how can i tackle this more easily.

    switch(itemIdx){

      /*-- Soil Moisture Reading Sequence--*/
      // Allow current to flow in Forward and Reverse direction while reading value from Soil Moisture Probe in both direction. Allowing delay between reading of analog sensors.  

....

    case 4:
      ReadPhoto = true; 
      break;

    case 5:
      TempRead = true;
      break;

    case 6:
      ButtonRead = true; 
    }
  }
  /*--- Function for swap menu display ---*/
  if (ButtonRead){
    SwapMenu();
    ButtonRead = (! ButtonRead);  
  }

Am having a weird issue, since morning, before coding the Revision 5 of my code, i.e. still running Rev 4 my temperature reading is unstable, it display values like 45 C and 18 C.
Yesterday night, before it did work nice, displaying amb. temperature in the range of 24 C.

When i run the code for temperature alone, i get correct values. . . Where is my mistake here . . . ? ? ?

Thanks for your time and consideration towards my issues . .

Find attached Rev 5 of my code.

GreenHouse_Rev_F_05.ino (11.4 KB)