calling a function from a library not in \libraries

gfvalvo:
@septillion, you missed (or ignored) my point.

No, I didn't miss your point :wink: Although I agree that is the better way of doing it, that is pretty complicated as a newbie because it comes with it's own pitfalls. It is for example also for a reason why Arduino has auto-prototyping. And with tabs newbies have at least a way of organizing the code and also get a feeling for logically splitting the code. And if they get more advanced, that logic can be used and extended to header and source files and enjoy the modularity and limited scope of it :slight_smile:

You have to remember, Arduino is aimed at beginners. And to help them some things are simplified which indeed limits the possibilities somewhat and might even seem stupid/annoying for us more advanced users. But I do think this lowers the threshold to learn C++ because it takes less time to make something that actually does something. Although that code might be very ugly, it keeps the interest in learning more.

gfvalvo:
So, if both techniques provide readability and organization, why not use the one that also provides MAINTAINABILITY as an advantage?

So to answer that question, because it is something you have to learn and is more complicated then just a tab. It's just a stepping stone in the learning process :slight_smile:

Reasonable points.

I can live with (even enjoy) many of the simplifications that are part of the Arduino IDE.

But the one that really pisses me off is the inability to have two separate Arduino projects easily draw from a common .h file. In my case I want to use the same nRF24 settings for my Tx and Rx programs.

In other worlds that is easily achieved by using a relative file reference.

You can do it in the Arduino world with a full path reference but then you have to edit that if you ever copy the projects somewhere else. I can say from experience that it is VERY frustrating trying to debug a project when you have forgotten to update the reference and it is actually using data from a file in a different location.

...R

There are default search paths for

#include "myLib.h"

and

#include <myLib.h>

are there not?

@Robin2, true, but you can fake it with a symlink :slight_smile: In Windows, assuming your in the RX folder "mklink /H config.h ..\TX\config.h

septillion:
@Robin2, true, but you can fake it with a symlink :slight_smile: In Windows, assuming your in the RX folder "mklink /H config.h ..\TX\config.h

Symlinks were in Linux long before Microsoft copied the idea :slight_smile:

They still require "doing" something. Relative references don't - I'm lazy.

...R

From W2000 on if not sooner, Micro$haft copied from Unix but hey the original PCDOS directly lifted CP/M primitives that were some present in W98. You could interface with parallel ports in Winblows back then.

Lazy? What about the forgets? Hey, where's muh keys?

Robin2:
Symlinks were in Linux long before Microsoft copied the idea :slight_smile:

I know, I really linked it when they added it in Vista :smiley: (It was there a little bit before that in 2k and XP but not usable for a normal user).