Arduino library installation management

In this tutorial, we will explain how to install the dependencies needed to compile the sample application.

Library management with the Arduino IDE 2.X

1. Open Arduino IDE 2.X, select Library Manager in the sidebar

2. Search for the relevant library name (Take M5Unit-ENV as an example, if it is M5CoreS3, enter M5CoreS3, and so on.) in the search box, and click install

Note:
If you are prompted to install another library as a dependency when installing a library, it is recommended that you click Install All, otherwise it may cause some functionality to be abnormal or even unusable.

3. Wait for the installation to be completed and ready to use

Library management with the Arduino 1.x.x

1.Open Arduino IDE, select Tools->Library Management

2.Search for the relevant library name in the search box (Take M5Unit-ENV as an example, if it is M5CoreS3, enter M5CoreS3, and so on.)

3.Click on Install

Note:
If you are prompted to install another library as a dependency when installing a library, it is recommended that you click Install All, otherwise it may cause some functionality to be abnormal or even unusable.

4.Wait for installation to be completed and ready for use

Installing libraries using the Arduino CLI

1.Find the appropriate library

arduino-cli lib search LibraryName

Eg:

$ arduino-cli lib search wifimanager
Name: "WiFiManager"
  Author: tzapu
  Maintainer: tzapu
  Sentence: ESP8266 WiFi Connection manager with fallback web configuration portal
  Paragraph: Library for configuring ESP8266 modules WiFi credentials at runtime.
  Website: https://github.com/tzapu/WiFiManager.git
  Category: Communication
  Architecture: esp8266
  Types: Contributed
  Versions: [0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0-beta, 0.15.0]

2.Installation library

arduino-cli lib install WiFiManager

Eg:

$ arduino-cli lib install WiFiManager
WiFiManager depends on WiFiManager@0.15.0
Downloading WiFiManager@0.15.0...
WiFiManager@0.15.0 downloaded
Installing WiFiManager@0.15.0...
Installed WiFiManager@0.15.0

Manual Installation of Dependency Libraries

If you encounter an error similar to the one shown below when compiling the example, you can try to find the relevant "dependency libraries" and install them manually using this procedure

1.Searching Github suggests the name of the missing header file such asUnit_MiniEncoderC.h

2.Find the library.properties file containing Unit_MiniEncoderC.h in the Code list

3.Click on the relevant repository, click on <>Code, then click on Download ZIP.

4.Unzip the downloaded package and drag it into Arduino->libraries.

Paths to Arduino libraries on different systems:
Windows: C:\Users{username}\Documents\Arduino
macOS: /Users/{username}/Documents/Arduino
Linux: /home/{username}/Arduino

On This Page