+ 1
Hello could someone explain to me why this arduino code doesn't work? It says that " 'n' was not declared in this scope" thanks.
4 odpowiedzi
+ 1
Thank you that was it
0
This link says that variable names are case sensitive.
Does it work when you use 'N'
https://arduino.stackexchange.com/questions/47671/the-code-is-showing-a-error-that-ledpin2-is-not-declared-in-the-scope?rq=1
0
Sorry in you case that is not the fault.
It is the ; behind the for-loop
for(int n = 2; n<= 12; n++); <-
The semicolon ends the for-loop before it even can start with it body.
Some code to prove my statement.
https://code.sololearn.com/cID2VOl11S9F
0
Cool. Glad it did.
Please like my answers if they helped you and mark the best answer "best answer".