管理涉及多个Arduino板的项目

huangapple go评论47阅读模式
英文:

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 &quot;../config.h&quot;

...

or

#include &lt;../config.h&gt;

...

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.

huangapple
  • 本文由 发表于 2023年6月13日 04:06:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76459971.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定