Go Down

Topic: Any way to include contributed libraries in core code? (Read 1 time) previous topic - next topic

liuzengqiang

Tried that. Defined it in pins_arduino.h for that variant. Somehow it didn't run (don't remember, maybe library couldn't be included). Still, that is not in .ino so in principle my question still stands.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

Juraj

Tried that. Defined it in pins_arduino.h for that variant. Somehow it didn't run (don't remember, maybe library couldn't be included). Still, that is not in .ino so in principle my question still stands.
why in .h? add a cpp

liuzengqiang

Juraj,

I appreciate you trying to help but you've provided nothing but unhelpful terse responses. Please use your TLC on others needing your help more.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

Juraj

there is a right way to do what you want. I didn't need it yet so I can't give you a complete solution, but it is the answer to your original question as I understand it now..

you can write your own core. then use the ArduinoCore-API to include the common Arduino classes.

or you can create a custom hardware definition or a core which references some existing core and define only a board variant. if you need a function called before setup(), your board variant can define initializeVariant() function.


Go Up