中文字幕理论片,69视频免费在线观看,亚洲成人app,国产1级毛片,刘涛最大尺度戏视频,欧美亚洲美女视频,2021韩国美女仙女屋vip视频

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
安裝Arduino附加庫

安裝Arduino附加庫

當(dāng)你用著Arduino或者內(nèi)建函數(shù)比較舒服的時(shí)候,你可能希望擴(kuò)展你的Arduino 附加庫。

附加庫是什么?

附加庫是一個(gè)代碼的集合,可以讓你方便的連接一臺(tái)傳感器、顯示器、模組等等。比如,內(nèi)建庫LiquidCrystal 庫使得在LCD上顯示字符變得方便。在網(wǎng)絡(luò)上,有成百上千的附加庫可供下載。內(nèi)建庫和一些附加庫在鏈接https://www.arduino.cc/reference/en/libraries/中,這些附加庫只有安裝后才能使用它們。

庫安裝方法

1)使用庫管理器

可以采用庫管理器的方式為Arduino IDE安裝一個(gè)新庫(Arduino IDE v1.6.2以后的版本支持)。打開IDE,點(diǎn)擊"Sketch"(項(xiàng)目)> Include Library(加載庫) > Manage Libraries(管理庫),如下圖所示。


庫管理器打開后,可以看到一個(gè)已經(jīng)安裝或可以安裝的庫列表。在本例中,我們將安裝Bridge 庫。在列表中找到該庫,點(diǎn)擊它并在版本選擇菜單中選擇將要安裝的版本,如下圖所示。在某些時(shí)候,某些庫只有一個(gè)版本可選。因此,如果選擇菜單沒有出現(xiàn),也很正常。

點(diǎn)擊安裝,并等待IDE完成該新庫的安裝?;诰W(wǎng)絡(luò)連接速度,下載可能會(huì)花費(fèi)一些時(shí)間。安裝完成后,會(huì)有一個(gè)深綠色的“INSTALLED”標(biāo)簽出現(xiàn)在Bridge庫上。這時(shí),可以關(guān)閉庫管理器。

可以在Sketch(項(xiàng)目) > Include Library(加載庫)菜單中找到剛才安裝的新庫。如果要安裝自己的庫到庫管理其中,參考鏈接https://github.com/arduino/library-registry/blob/main/FAQ.md#readme中的內(nèi)容。

2)導(dǎo)入 .zip格式的庫

庫一般表現(xiàn)為ZIP文件或文件夾。文件夾的名稱一般為庫名,文件夾內(nèi)部一般包括一個(gè).cpp文件和一個(gè).h文件,通常還會(huì)有一個(gè)關(guān)鍵字.txt文件、示例文件夾,以及該庫的其他依賴文件。從Arduino IDE 1.0.5開始,可以安裝第三方庫。不要解壓zip文件,保持它的原始狀態(tài)。

在Arduino IDE中, Sketch(項(xiàng)目) > Include Library(加載庫) > Add .ZIP Library(添加.ZIP庫)。

準(zhǔn)確的選擇要添加的庫。導(dǎo)航到.zip文件的位置并打開它。


返回Sketch(項(xiàng)目) > Include Library(加載庫),可以看到將要安裝的庫位于下拉菜單的底部。該庫已經(jīng)可以用于項(xiàng)目中。該庫的zip文件已經(jīng)解壓到Arduino項(xiàng)目目錄下的庫文件夾。

注意:該庫可以用于項(xiàng)目中,但是在舊版本IDE示例中,該庫直到IDE重啟之前,不會(huì)出現(xiàn)在File (文件)> Examples(示例)中

3)手動(dòng)安裝

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 “l(fā)ibraries” 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 “l(fā)ibraries” 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.

cited:https://www.arduino.cc/en/Guide/Libraries

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
什么是Arduino的庫?
Arduino/Genuino 101 入門教程一:環(huán)境配置
用Arduino UNO燒錄Attiny13A芯片
新車間Arduino圖形化編程軟件
Arduino系統(tǒng)
如何在SAP WebClient UI里創(chuàng)建柱狀圖(bar chart)
更多類似文章 >>
生活服務(wù)
熱點(diǎn)新聞
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服