| |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
-> 开发工具 -> 安装Arduino附加库 -> 正文阅读 |
|
[开发工具]安装Arduino附加库 |
安装Arduino附加库当你用着Arduino或者内建函数比较舒服的时候,你可能希望扩展你的Arduino 附加库。 附加库是什么?附加库是一个代码的集合,可以让你方便的连接一台传感器、显示器、模组等等。比如,内建库LiquidCrystal 库使得在LCD上显示字符变得方便。在网络上,有成百上千的附加库可供下载。内建库和一些附加库在链接https://www.arduino.cc/reference/en/libraries/中,这些附加库只有安装后才能使用它们。 库安装方法1)使用库管理器可以采用库管理器的方式为Arduino IDE安装一个新库(Arduino IDE v1.6.2以后的版本支持)。打开IDE,点击"Sketch"(项目)> Include Library(加载库) > Manage Libraries(管理库),如下图所示。
2)导入 .zip格式的库库一般表现为ZIP文件或文件夹。文件夹的名称一般为库名,文件夹内部一般包括一个.cpp文件和一个.h文件,通常还会有一个关键字.txt文件、示例文件夹,以及该库的其他依赖文件。从Arduino IDE 1.0.5开始,可以安装第三方库。不要解压zip文件,保持它的原始状态。 在Arduino IDE中, Sketch(项目) > Include Library(加载库) > Add .ZIP Library(添加.ZIP库)。 准确的选择要添加的库。导航到.zip文件的位置并打开它。
注意:该库可以用于项目中,但是在旧版本IDE示例中,该库直到IDE重启之前,不会出现在File (文件)> Examples(示例)中 3)手动安装When you want to add a library manually, you need to download it as a ZIP file, expand it and put in the proper directory. The ZIP file contains all you need, including usage examples if the author has provided them. The library manager is designed to install this ZIP file automatically as explained in the former chapter, but there are cases where you may want to perform the installation process manually and put the library in the libraries folder of your sketchbook by yourself. You can find or change the location of your sketchbook folder at File > Preferences > Sketchbook location. Go to the directory where you have downloaded the ZIP file of the library Extract the ZIP file with all its folder structure in a temporary folder, then select the main folder, that should have the library name Copy it in the “libraries” folder inside your sketchbook. Start the Arduino Software (IDE), go to Sketch > Include Library. Verify that the library you just added is available in the list. Please note: Arduino libraries are managed in three different places: inside the IDE installation folder, inside the core folder and in the libraries folder inside your sketchbook. The way libraries are chosen during compilation is designed to allow the update of libraries present in the distribution. This means that placing a library in the “libraries” folder in your sketchbook overrides the other libraries versions. The same happens for the libraries present in additional cores installations. It is also important to note that the version of the library you put in your sketchbook may be lower than the one in the distribution or core folders, nevertheless it will be the one used during compilation. When you select a specific core for your board, the libraries present in the core’s folder are used instead of the same libraries present in the IDE distribution folder. Last, but not least important is the way the Arduino Software (IDE) upgrades itself: all the files in Programs/Arduino (or the folder where you installed the IDE) are deleted and a new folder is created with fresh content. This is why we recommend that you only install libraries to the sketchbook folder so they are not deleted during the Arduino IDE update process. |
|
|
上一篇文章 下一篇文章 查看所有文章 |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 | -2024/11/16 2:19:42- |
|
网站联系: qq:121756557 email:121756557@qq.com IT数码 |