英文:
Managing an Arduino project involving multiple boards
问题
我应该如何轻松管理一个具有多个Sketch(project/sketch_)/sketch_0.ino; project/sketch_1/sketch_1.ino; 等等)以及独特配置.h文件的Arduino项目?
我已经尝试过
#include "../config.h"
或者
#include <../config.h>
但似乎不起作用。
有什么帮助吗?
英文:
How would I go about easily managing an Arduino project that has multiple sketches(project/sketch_)/sketch_0.ino; project/sketch_1/sketch_1.ino; ecc.) for multiple boards with a unique configuration .h file?
I've already tried
#include "../config.h"
...
or
#include <../config.h>
...
but it doesn't seem to work.
Any help?
答案1
得分: 0
将该文件放入名为“config”的文件夹中,然后可以在您的每个程序中像常规库一样使用它。 但考虑为其取一个稍微独特的名称,以防您想在其他项目中执行类似操作。 只需确保包含该文件的文件夹与.h文件同名,并位于IDE的用户库文件夹中。
英文:
Put that file in the libraries folder in a folder called "config" and then you can use it in each of your programs like a regular library. You might consider giving it a slightly more unique name though in case you want to do a similar thing with other projects. Just make sure the folder it's in has the same name as the .h file and it's in the user libraries folder for the IDE.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论