monkeybiscuits
Active member
Say I have a library with two parts (all in the same folder):
1) foo.cpp / foo.h which #include “Bounce.h”
2) bar.cpp / bar.h which #include “Encoder.h”
I want to write fooExample.ino which should only require “Bounce.h” so I
#include <Bounce.h>
#include “foo.h”
How can I get that sketch to compile without #include <Encoder.h> too? fooExample.ino doesn't need it! I'm wondering if this is just one of those “Arduino includes are a pain. Just deal with it” things. I'd love to hear any solution that doesn't require me to include unneeded libraries in the sketch.
If it sounds like a problem with the way I'm coding it, the library can be found here.
https://github.com/monkeybiscuits/MIDIcontroller
1) foo.cpp / foo.h which #include “Bounce.h”
2) bar.cpp / bar.h which #include “Encoder.h”
I want to write fooExample.ino which should only require “Bounce.h” so I
#include <Bounce.h>
#include “foo.h”
How can I get that sketch to compile without #include <Encoder.h> too? fooExample.ino doesn't need it! I'm wondering if this is just one of those “Arduino includes are a pain. Just deal with it” things. I'd love to hear any solution that doesn't require me to include unneeded libraries in the sketch.
If it sounds like a problem with the way I'm coding it, the library can be found here.
https://github.com/monkeybiscuits/MIDIcontroller