while(1)
{
if
{
timer to contorl watering pump to on
}
else if
{
contol water level
}
else if
{
cut off watering pump signal
}
}
not sure why u say the if else statement is not suitable. but
mayb u can draw a flow chart for your system first then u will figure out how to arrange the if-else.
regards,
yh