Other files within sketch directory

What types of other files can you put into a sketch directory besides a .ino file?

If you can stick a data file in there, how can your sketch read from or write to that file?

Is it possible to have other .ino files within the directory and have one of these files call another of these files?

I guess, what I am looking for is a tutorial explaining this.

Thanks,

You can have other ino files, or C header files or cpp files. You can not have data files as there is no way to read them. You can #include them from the start of your main sketch file. It is handy for reusing files, for example I have a file at defines all the register names in one chip I use. If the project contains that chip I just include a copy of that file.

You can also include .txt files with notes about your project. The compiler will ignore them. I use .txt files to record my thoughts as I design how my sketch should work - especially if I am trying something new.

I often create a backup copy of my sketch before I start to make significant changes. If my sketch file is called mySketch.ino I call the backup file mySketch.ino.BK1 and the compiler ignores that as well. It makes it very easy to go back to the earlier version.

...R