+ 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.

https://code.sololearn.com/cmenycx2TLUw/?ref=app

12th Feb 2019, 9:11 PM
Alexis Durand
Alexis Durand - avatar
4 Respostas
+ 1
Thank you that was it
12th Feb 2019, 9:34 PM
Alexis Durand
Alexis Durand - avatar
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
12th Feb 2019, 9:23 PM
sneeze
sneeze - avatar
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
12th Feb 2019, 9:29 PM
sneeze
sneeze - avatar
0
Cool. Glad it did. Please like my answers if they helped you and mark the best answer "best answer".
12th Feb 2019, 9:45 PM
sneeze
sneeze - avatar