Last stage debugging - Help !![SolveD]

hello . .

Been working a bit with the code. .

I haven't looked at your code at all, but this comment above caught my eye. If you are implementing a resistive moisture sensor then you will probably be trying to set up a voltage divider with some high resistances. In that case, the integral LED that most Arduinos have connected to pin13 might be acting as a pull-down which prevents your circuit from dividing the voltage correctly. You could try using any pin other than 13; if that then works correctly it suggests this was the problem.

I agree with you that the pull down resistor willbe adding up in the voltage divider circuit, even though changing the pin from 13 to 8 still results in my voltage not flipping. however, i did observed some more stable values.

I bring some changes here with the code, but still stick to my bug :

// Function to run water pump on conditions of soil moisture

if (FuncActive == true){
  if (pump_Status == false){
pumpControlON ();
  }
}

// Function to run off pump based on conditions
if ( pump_Status == true){
pumpControlOFF();
}

// Function to Activate LightSwitch for plants on conditions of ambient light
if (ReadPhoto == true){
LightAction ();
}
 // Function in taking Temperature Readings and saving to global variable Actualtemp
if (TempRead == true){
Actualtemp = temperatureRead ();
TempRead = false;
}

i think i will be changing the switch case variable, the itemIdx from incrementing directly as a parameter function, rather incrementing it through each case, any suggestion towards that approach.

Thanks