.H file not found during compile

FYI, I am a newbie here and trying to learn the Arduino IDE.
I am using the IDE and I'm using a example file. I am trying to expand this example by adding a .H file. So, I have a folder containing my .ino file, both with the same name. Then I did an "add tab" and saved it (oledtypes.h). Now I have a .H file within my sketch folder, right next to the .ino file. I added an include file in the .ino, "#include <oledtypes.h>" .

When compiling, I get file not found. I also put the .H file within a src folder, as I read somewhere newer IDE versions need the .H files in a src folder. No change. I have some open source projects that have the .H file alongside the .ino file, as well as other projects with the .H in src folders.

When I use a complete file path in the include, all the way from C:, it works fine.

What am I missing?

Thanks,
Bob

Alternatives for OLedTypes.h: []DewPointMeter:53:10: fatal error: OLedTypes.h: No such file or directory

ResolveLibrary(OLedTypes.h) #include <OLedTypes.h>

      ^~~~~~~~~~~~~  -> candidates: []

compilation terminated.
Using library U8g2 at version 2.33.15 in folder: C:\Users\RB\Documents\Arduino\libraries\U8g2
exit status 1
OLedTypes.h: No such file or directory

Use

#include "oledtypes.h"

to make the compiler look for the file in the same folder as the the .ino

Hi UK,
OK, now I feel stupid. I tried follow other examples of #include, but I think I was looking at library .H files that use <filename.h> instead of quotation marks. Sometimes you see what you want to see...

Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.