Multiple .ino files in a sketch, good idea?

  1. I am making a project. Earlier I thought I will have one .ino file with multiple .c & .h files.

  2. However I have noticed, that to use library of arduino like wire lib, I can call it in .ino file only.
    If I make another .c file & add #include<wire.h>, it shows error.
    I don't call all the libs in mian .ino because that will be a mess.

  3. So I have to create multiple .ino files. I want to know it its a good idea to have multiple .ino files in a project.

  4. Also I have noticed that on naming a sketch "main.ino", compielr through eror on building.
    probabaly because already there is main.cpp in backend. Right?

  1. However I have noticed, that to use library of arduino like wire lib, I can call it in .ino file only.

Not true.

If I make another .c file & add #include<wire.h>, it shows error.

You can NOT hide the use of one library by another. If that is the error, get over it.

I don't call all the libs in mian .ino because that will be a mess.

#including a header file and "calling a library" are two quite different things.

  1. So I have to create multiple .ino files. I want to know it its a good idea to have multiple .ino files in a project.

No, you don't. It is neither a good or bad idea by itself. There are times when it makes sense. There are times when it does not. This appears to be a not.

  1. Also I have noticed that on naming a sketch "main.ino", compielr through eror on building.
    probabaly because already there is main.cpp in backend. Right?

The .ino files are combined into a single cpp file for compiling. That cpp file is merged with one called main.cpp. Having two files named main.cpp in the same directory is not possible.

thanx