error: 'doTest' was not declared in this scope
hi - trying figure out how call functions have been defined in code brought in through #include. imagine has come lot, sorry- did searches on forum couldn't find relevant.
for learning purposes i've created test sketch, test.c , test.h files. how call function in test.c ('dotest()'). , matter, how variables within included files made available within sketch?
finally (!) better/different use tab each .c + .h file? piece looking for? simple test code below.
thanks tips - real stumper me.
---roy
--test.h
--test.c
for learning purposes i've created test sketch, test.c , test.h files. how call function in test.c ('dotest()'). , matter, how variables within included files made available within sketch?
finally (!) better/different use tab each .c + .h file? piece looking for? simple test code below.
thanks tips - real stumper me.
---roy
code: [select]
#include <test.h>
void setup(){
//do set up
}
void loop(){
dotest();
}
--test.h
code: [select]
#ifndef _test_h
#define _test_h
#include <inttypes.h>
//define stuff
#endif
--test.c
code: [select]
void dotest() {
//do stuff
}
where's file located?
test.c need #include "test.h"
main sketch may need #include "test.h"
test.c need #include "test.h"
main sketch may need #include "test.h"
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > error: 'doTest' was not declared in this scope
arduino
Comments
Post a Comment