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


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.

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