當您熟悉 86Duino 軟體並使用內建的功能後,您可能想要使用額外的函式庫來擴充 86Duino 的能力。
程式庫 ( Libraries ) 是什麼?
程式庫是程式碼的集合,可讓您輕鬆連接感測器、顯示器、模組等。例如,內建的 LiquidCrystal library 可讓您輕鬆與字元 LCD 顯示器對話。網際網路上有數百個額外的函式庫可供下載。內建的函式庫和其中一些額外的函式庫列於 參考資料. 若要使用額外的函式庫,您需要先安裝它們。
如何安裝程式庫 ( Library )
Libraries are often distributed as a ZIP file or folder. The name of the folder is the name of the library. Inside the folder will be a .cpp
file, a .h
file and often a keywords.txt
file, examples
folder, and other files required by the library.
自動化安裝
若要在 IDE 中安裝第三方函式庫,請勿解壓縮已下載的函式庫,並保持原樣。
在 86Duino 編碼中,選到 草圖 > 匯入函式庫 ( Sketch > Import Library ). 在下拉清單的頂部,選擇「新增圖庫」( “Add Library” )選項。

You will be prompted to select the library you would like to add. Navigate to the .zip
file’s location and open it.

Return to the Sketch > Import Library menu. You should now see the library at the bottom of the drop-down menu. It is ready to be used in your sketch.

The zip file will have been expanded in the libraries
folder in your 86Duino sketches directory.
NB: the library will be available to use in sketches, but examples for the library will not be exposed in the File > Examples until after the IDE has restarted.
Manual installation
To install the library, first quit the 86Duino Coding application.
Then uncompress the ZIP file containing the library. For example, if you’re installing a library called “DuinoParty”, uncompress DuinoParty.zip
. It should contain a folder called DuinoParty, with files like DuinoParty.cpp
以及 DuinoParty.h
inside. (If the .cpp
以及 .h
files aren’t in a folder, you’ll need to create one. In this case, you’d make a folder called “DuinoParty” and move into it all the files that were in the ZIP file, like DuinoParty.cpp
以及 DuinoParty.h
.)
Drag the DuinoParty folder into this folder (your libraries folder). Under Windows, it will likely be called “My Documents\86Duino\libraries”. For Mac users, it will likely be called “Documents/86Duino/libraries”. On Linux, it will be the “libraries” folder in your sketchbook.
Your 86Duino library folder should now look like this (on Windows):
My Documents\86Duino\libraries\DuinoParty\DuinoParty.cpp
My Documents\86Duino\libraries\DuinoParty\DuinoParty.h
My Documents\86Duino\libraries\DuinoParty\examples
....
or like this (on Mac):
Documents/86Duino/libraries/DuinoParty/DuinoParty.cpp
Documents/86Duino/libraries/DuinoParty/DuinoParty.h
Documents/86Duino/libraries/DuinoParty/examples
...
or similarly for Linux.
There may be more files than just the .cpp
以及 .h
files, just make sure they’re all there. (The library won’t work if you put the .cpp
以及 .h
files directly into the libraries folder or if they’re nested in an extra folder. For example:
Documents\86Duino\libraries\DuinoParty.cpp
以及
Documents\86Duino\libraries\DuinoParty\DuinoParty\DuinoParty.cpp
won’t work.)
Restart the 86Duino Coding application. Make sure the new library appears in the Sketch->Import Library menu item of the software.
That’s it! You’ve installed a library!
Getting-Started Home
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.