Go Down

Topic: using TABS in IDE (Read 503 times) previous topic - next topic

peter1929

Sorry all, but still learning,

Has any one have an example sketch that show how to use tabs to make programming easy ?

The arduino Reference is a bit confusing, so if any one has a basic sketch that shows this it would be great or a link to one.

THX for any suguestions.

Noorman

Your best option is to use an external editor.
This makes programming easier than using the IDE, the IDE's functionality is rather limited.
I use the IDE only to compile and upload.
2B || !2B

... bonding electrons and bits!

PaulS

Using multiple tabs is done so that you can have multiple files open at once. This allows you to have more organized code. It is not done "to make programming easy".

If you have a specific question, we'd be happy to answer it.

peter1929

Ok then if  for example i have a basic sketch, on main tab that when i press a button moves a motor.

Then could i make the sketch for my next step in the program that counts how long the motor ran for in another tab.  so i could break the whole sketch into peices ?


PaulS

You can create additional files, with various extensions (.pde, .cpp, .h are two that I KNOW can be used).

You can put functions in any pde file that is in the same folder as the base pde file. All pde files will be merged into one file for compilation, with no need to #include anything.

Putting code in .cpp and declarations in .h file does require special handling.

peter1929

thanks for the info, now i understand, thanks again

Go Up