Hallo,

bei " z3 = lzahn2Prog;" kommt die Fehlermeldung: cannot convert 'float(float, float)' to 'float' in assignment

Was ist da falsch? Wie muss das richtig aussehen?

Code:
float z3 = 1;

void setup() {
  Serial.begin (250000);    //  diese Buadrate muss auch in der Konsole (Serieller Monitor) eingestellt sein
  while (!Serial);
}

void loop() {
  lzahn2Prog (231.56994, 57.56108);  // Unterprogrammaufruf

  z3 = lzahn2Prog;

  Serial.print ("lzahn2 = ");
  Serial.println (z);
  delay(2000);
}


//  **************************************Unterprogramm lzahn2  *******************************
float lzahn2Prog ( float x1, float y1) {
  float P0_P1 = sqrt(x1 * x1 + y1 * y1);                           //Gerade P0-P1
  float CosinusW4 = (114196 - P0_P1 * P0_P1) / 102960;
  float W4 = acos(CosinusW4);                                     // die Ausgabe erfolgt im Bogenmaß
  float lzahn2 = sqrt(   (21164.49 - cos (W4 + 3.428571428571429 / 180 * 5.26)) *  20574   )

                 return lzahn2;                                          // die Ausgabe erfolgt im Bogenmaß
}
Gruß
fredyxx

- - - Aktualisiert - - -

Fehler ist mir nun klar.

Gruß
fredyxx