I just received my Arduino Duemilanove today and I got started on my project (an induction wind turbine controller)
I tried moving a class over to a header file (by adding a new tab to the project and naming it tmr.h). However, when I include the header file in my main project, I get a compile error that millis was not declared (it worked fine before moving it to a separate header file)
I'm guessing its something with the way that the Arduino IDE includes files before including its own library files, but I haven't found a way to make this work.
What is the correct way to use header files in the Arduino IDE?
just noticed another oddity... It won't let me use the boolean type specifier in the type definition, but oddly enough the "bool" specifier doesn't error out?
ok, i fixed if by adding #include "WProgram.h" to the top of the header file... But now my question is... Is this the proper way to handle header files?? If so, why isn't this documented????
I think you're mistaking the Arduino development system for a professional ($$$), supported development tool You'll note that the forums and the playground (Wiki) are where people post things that they learn for others to know. It's a bit different than the world of supported software with 1-800 numbers but if you keep an open mind you'll get used to it.
--
The Quick Shield: breakout all 28 pins to quick-connect terminals
Arduino is made using c++ and that isnt really suported by the avr-gcc compiler that is made for c, so basically the code is pared from c++ to c, and after that there are some things done in strange ways in the arduino ide, maybe because that makes it easier to learn but harder to understand and to improve.
Arduino is made using c++ and that isnt really suported by the avr-gcc compiler
Uhh. Yes, it is.
and after that there are some things done in strange ways in the arduino ide
The IDE creates function prototypes, a main function, and invokes init(), setup(), and loop() in an infinite loop. Nothing really strange about any of the steps.
maybe because that makes it easier to learn but harder to understand and to improve.
Easy to learn and hard to understand seem to be contradictory attributes.