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

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"


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > error: 'doTest' was not declared in this scope


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums