Where should uint8_t and boolean be defined?

I am brand new to Arduino, but I have used C and BASIC for years. I got the light to blink. I have been playing with the example SerialCallResponceASCII and all was going well. My first real task is to communicate with a TI bq2052 chip by HDQ serial. I found HDQ routines by xSmurf that look like they should do the job, and imported them into SeralCallResponceASCII. But when I compile I get many errors concerning 'boolean' does not name a type, and 'uint8_t' does not name a type.

I am sure I could define those terms in my own code, but where SHOULD those be defined? I want to start out learing a new language by using good programming form.

I am sure I could define those terms in my own code, but where SHOULD those be defined?

Are you asking where they ARE defined? wiring.h contains a typedef statement that makes boolean exist, and stdint.h defines uint8_t.

The compiler is complaining that they are NOT defined, so I guess wiring.h is not getting included in the compile.

The example SerialCallResponceASCII that came with the IDE compiles and runs fine on its own. I added a HDQ folder containing hdq.h and hdq.cpp to my Arduino/libraries folder. Then I used Sketch/Import Library to add it to SerialCallResponceASCII, and that put #include <hdq.h> at the top of the file. Now if I “verify” I get dozens of errors, most say ‘uint8_T’ does not name a type, or ‘boolean’ does not name a type, or ISO C++ forbids declaration of ‘uint8_T’ with no type.

If I comment out #include <hdq.h> the errors all go away.

"uint8_T" ?

If I comment out #include <hdq.h> the errors all go away.

Then I think you know where the issue lies. If you need help solving it, a link to the library would be useful.

Also, where you put the include file statement is important. Your code?

Here is where I got the HDQ code:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1202494952

The #include <hdq.h> comes in as the first line in the IDE code window. I get the same effect with the Blink example file (which is much shorter than SerialCallResponceASCII). Here is the bombing version of Blink:

#include <hdq.h>

/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain.
*/

void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}

void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
}

AWOL: "uint8_T" ?

The Fortran/asm/BASIC programmer in me says this is xSmurf's term for an unsigned 8 bit integer. I am not sure what _T means, or if this is common Aurduino nomenclature.

"uint8_T" ?

Its the capital T. The "standard" type uint8_t exists, the uint8_T is ....

The other compiler error is because the HDQ library you're using is not #include'ing Wiring.h. I noticed the HDQ files seemed old, so something may have changed with the Arduino IDE compile/dependencies, breaking in the newer version.

I presume yuo will be using some HDQ calls in the next version, because there is no need to include it in the blink example you gave.

Put

#include <WProgram.h>

in your library header file(s).

Jim