Hallo zusammen.
Hier habe ich eine Fehlermeldung die ich nicht beseitigen kann.
Fehler: Compilation error: 'DisplFeld3' was not declared in this scope;
	Code:
	...
 if(Ishunt < 1.0)  {    //wenn Wert < 1,0A ist, [mA]-Anzeige
    String DisplFeld3 = "3 " + String(IshuntMA, 1) + "mA";
    }
    else {
      String DisplFeld3 = "3 " + String(Ishunt, 1) + "A"; 
    }
String DisplFeld4 = "4 von Pin " + String(VmwMax, 0);
...
display.setCursor(1,46);
display.print(DisplFeld3);
display.setCursor(1,62);
display.print(DisplFeld4); 
...
 Die Fehlerursache ist, dass die if-else -Schleife nicht durchlaufen wird! Aber warum nur?
- - - Aktualisiert - - -
Füge ich folgende Testzeile hinzu, kommt keine Fehlermeldung und wird nur "3 test" angezeigt.
	Code:
	...
  String DisplFeld3 = "3 test";  //TESTzeile
  if(Ishunt < 1.0)  {
    String DisplFeld3 = "3 " + String(IshuntMA, 1) + "mA"
    }
    else {
    String DisplFeld3 = "3 " + String(Ishunt, 1) + "A";
  }
...
 
						
					
Lesezeichen