[Solved] ‘ variable’ was not declared in this scope [closed]

[ad_1]

Well,

Serial.println("Resistance 1: " + String(f1r) + " ohms");

it uses the variable f1r whose scope just ended.

In C++, when a variable is defined inside a scope (between some { and }), it does not exist outside of it.

[ad_2]

solved ‘ variable’ was not declared in this scope [closed]