Hi there,
I have a question: can I put library.h in the setup or loop method ?
I wanna put the "#include <ArduinoJson.h>" right into the the loop method ?
My real intention is: to activate or deactivate the library
Hi there,
I have a question: can I put library.h in the setup or loop method ?
I wanna put the "#include <ArduinoJson.h>" right into the the loop method ?
My real intention is: to activate or deactivate the library
No,
A library is used by the compiler at compile time, and "disappears" after the code is compiled.
Therefore it is not possible to activate and deactivate the library in a code in use after it has been compiled.
Explain your need better, as there may be other ways to do what you need.
it sounds logical, thanks man.
Do you get a warning or error when including a library file from setup()
or loop()
?
I tested it here by putting a library either in setup() or in loop() and compiled it.
No error messages were printed.
IDE 1.8.19
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.