while statement
i copy/paste following code , compiler tells me 'stanby' not declared in scope
i run original code copied , it's ok (?)
can tell me what's happening...
my code:
void loop() {
while (pind = 0) {
stanby(); }
void stanby() {
portb = 0;
}
i run original code copied , it's ok (?)
can tell me what's happening...
my code:
void loop() {
while (pind = 0) {
stanby(); }
void stanby() {
portb = 0;
}
you should post of code. didn't include 'setup()' function.
in you've shown, left closing curly bracket off 'loop()' function. if add empty 'setup()', plus add missing } @ end of 'loop()', code compiles fine.
edit: 1 more thing spotted.
this:-
in you've shown, left closing curly bracket off 'loop()' function. if add empty 'setup()', plus add missing } @ end of 'loop()', code compiles fine.
edit: 1 more thing spotted.
this:-
code: [select]
while (pind = 0)
should this:-code: [select]
while (pind == 0)
Arduino Forum > Using Arduino > Programming Questions > while statement
arduino
Comments
Post a Comment