When I add a file to a sketch, such as a example.h file, the behaviour of the Arduino IDE is a little confusing.
I placed example.h in the same folder as my sketch and clicked Sketch > Add file
The IDE added a subfolder called example.h, containing a file example.h.ino !
I didn't see anything in the code relating to this and typing
#include "example.h"
yielded errors about being unable to find the file.
So I removed the automatically added .ino extension and tried again. No luck.
I decided to use Sketch > Add file again. It said "Would you like to replace example.h?" Upon clicking Yes it said "could not delete"
I am not understanding the reasons for all this.
Why the .ino extension? - I didn't ask for that - I already have my main .ino file.
Where is Arduino storing this info?
Why can't I just use my own include statements?
Thank you for any insight.
