'ITDB02' does not name a type error

Hello,
I’ve just bought this:

Arduino set. Some simple experiments with it (LED’s, switches etc.) went without problems, so hardware and connections should be OK (I hope). Now I’ve tried to launch the popular demo sketch (ITDB02_Graph16_Demo.ino) to test the screen, but it don’t want to compile with the error as in subject: ‘ITDB02’ does not name a type.

Files: ITDB02_Graph16.h and ITDB02_Graph16.cpp are in same directory.
The line where it stops is:
ITDB02 myGLCD(A1,A2,A0,A4,A5,2);
Where I’m wrong and how could I correct it?
Many thanks in advance,

Marek.

P.S. I’ve found (probably!) similar topic on this forum, but in italian… :frowning:

Files: ITDB02_Graph16.h and ITDB02_Graph16.cpp are in same directory.

Good. They should be. The question is WHICH directory?

Did you restart the IDE after installing the library?

Thanks for quick info.

  1. Directory is: c:\temp\ITDB02_Graph16_Demo

  2. I've started IDE from scratch with ITDB02_Graph16_Demo.ino and both library files in place. IDE shows both libraries in tabs. If I good understood what You mean...

Marek,

Does the file (probably the main sketch) that provokes the error message include this line:

#include "ITDB02_Graph16.h"

neat the beginning?

You need to take the files out of C:\temp, and put them in the proper “libraries” folder.
For instance, mine is “C:\Users\Andrew\Documents\Arduino\libraries”. If your Arduino Sketch folder does not have a libraries folder, make one and put the ITDB02 _Graph16 folder inside. You will need to close out the IDE and reopen it.

Also make sure you use #include instead of #include "ITDB02 _Graph16.h"

Added: dc42 beat me to it.

@IQ955
When you get it to work, let me know. I have the same library and I made a few new functions, like draw triangle and radio buttons (round and square).

Yes.
It appears as follows (it’s beginning of this sketch):

#include <Wire.h>
// some comments: blabla
#include <ITDB02_Graph16.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
//myGLCD(RS,WR,CS,RST,ALE,mode);
ITDB02 myGLCD(A1,A2,A0,A4,A5,2);   //
void setup()
{  etc.....

Greetings,

Marek.

Is "'ITDB02' does not name a type. " the very first error that the IDE reports?

If so, then I think we need to see the contents of file ITDB02_Graph16.h.

To HazardsMind: I've applied Your hints - problem persists.

To dc42:

Yes. If You ask about these on the orange background (sorry - I'm Arduino IDE newbie :-). In course of compilation (bottom window) are some as well.

Marek.

Could you post the errors?

I wonder if the library still has "Wprogram.h" instead of "Arduino.h"?

Of course. They are:

C:\Program Files\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -IC:\Program Files\Arduino\hardware\arduino\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\variants\mega -IC:\Program Files\Arduino\libraries\Wire C:\DOCUME~1\XP\LOCALS~1\Temp\build9193908411668025728.tmp\ITDB02_Graph16_Demo.cpp -o C:\DOCUME~1\XP\LOCALS~1\Temp\build9193908411668025728.tmp\ITDB02_Graph16_Demo.cpp.o ITDB02_Graph16_Demo.ino:15:28: warning: ITDB02_Graph16.h: No such file or directory ITDB02_Graph16_Demo:21: error: 'ITDB02' does not name a type ITDB02_Graph16_Demo.ino: In function 'void setup()': ITDB02_Graph16_Demo:30: error: 'myGLCD' was not declared in this scope ITDB02_Graph16_Demo.ino: In function 'void loop1()': ITDB02_Graph16_Demo:35: error: 'myGLCD' was not declared in this scope ITDB02_Graph16_Demo.ino: In function 'void loop()': ITDB02_Graph16_Demo:50: error: 'myGLCD' was not declared in this scope ITDB02_Graph16_Demo:58: error: 'CENTER' was not declared in this scope ITDB02_Graph16_Demo:61: error: 'LEFT' was not declared in this scope ITDB02_Graph16_Demo:62: error: 'RIGHT' was not declared in this scope

First problem:

ITDB02_Graph16_Demo.ino:15:28: warning: ITDB02_Graph16.h: No such file or directory

Probably because I've trasferred the libraries to "libraries" directory, as HazardsMind suggested. Now I hold sketch and libraries together and error reports are changed.

It seems, that first of all I should arrange my files correctly.

So, C:\Arduino\ITDB02_Graph16_Demo

and in this directory I put the files:

• ITDB02_Graph16_Demo.ino • ITDB02_Graph16.cpp • ITDB02_Graph16.h

Is it OK?

Marek.

There are two Arduino folders, one is a core folder, the other is a sketch folder. The sketch folder is usually located in your "my Documents", that is where you must put/make the libraries folder and put the two graph libraries in it.

So, C:\Arduino\ITDB02_Graph16_Demo

and in this directory I put the files:

That's wrong. In the Arduino folder, you need one called libraries. ITDB02_Graph16_Demo goes in libraries.

Hello,

I've finally aranged my files correctly (I hope) and both compiling and uploading are done succesfully and... hardware make nothing. :-( But it's just my problem to solve... tomorrow.

Anyway - many thanks for all replies and help.

Greetings :D

Marek.

hardware make nothing

?