not declared in this scope

The error message is because you declare it as ledOn, with a lowercase n, but try to use ledON, with an uppercase N.