Fehler: was not declared in Scope

Guten Morgen,
ich habe ein Problem bei meinem ziemlich einfachen Code:

void setup()
{
// declaration of variables / Deklaration der Variablen
// Inputs
int Analog = A0;
// Outputs
// Static
int Sensorwert = 0;
}

void loop()
{
// Programm start
Sensorwert = analogRead(Analog);

}

Sensorwert und Analog sind nicht deklariert. Ich habe auch den Code ohne die Zeile kompiliert. Hat nicht geholfen

// declaration of variables / Deklaration der Variablen
// Inputs
int Analog = A0;
// Outputs
// Static
int Sensorwert = 0;

void setup()
{
}

void loop()
{
   // Programm start
   Sensorwert = analogRead(Analog);
}

Dankeschön :grinning:

Da wahr ich wohl blind :see_no_evil:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.