Relay feedback control
Answering my own question, I think I found some way to get the solar panel face the sun.

As said before, the inclinometer reads the position and makes some calculations using lookposition() function, then this happens:

void lookforsun() {
  while ((targetElevation + 3) &lt; realElevation | (targetElevation - 3) &gt; realElevation) {

    Serial.println("Elevation is not correct");

    while (realElevation &lt; targetElevation)
    { Serial.println("Moving to south");
      digitalWrite(south, LOW);
      lookposition();
    }
    digitalWrite(south, HIGH);

    while (realElevation &gt; targetElevation)
    { Serial.println("Moving to north");
      digitalWrite(north, LOW);
      lookposition();
    }
    digitalWrite(north, HIGH);
  }


  while ((targetHourangle+3) &lt; realHourangle |  (targetHourangle-3) &gt; realHourangle  ) {

    Serial.print("Hour angle is not correct");
    while (realHourangle &gt; targetHourangle)
    { Serial.println("Moving to east");
      digitalWrite(east, LOW);
      lookposition();
    }
    digitalWrite(east, HIGH);

    while (realHourangle &lt; targetHourangle)
    { Serial.println("Moving to west");
      digitalWrite(west, LOW);
      lookposition();
    }
    digitalWrite(west, HIGH);
  }


As you can see I took the frightening way of nested while loops, but appears to work.

The first while measures if realElevation is between +-3 degrees of targetElevation, if realElevation is far away (target+-3) enters the second while loop, which determines if needs to go up or down.

I included the +-3 because the sensor is so very sensible.

Thank you very much  Russell McMahon and portforwardpodcast for your ideas!