1.4 Install libraries (Important)¶
Download the Code
Download the relevant code from the link below.
A library, gathering some function definitions and header files, usually contains two files: .h (header file, including function statement, Macro definition, constructor definition, etc.) and .cpp (execution file, with function implementation, variable definition, and so on). When you need to use a function in some library, you just need to add a header file (e.g. #include <dht.h>), and then call that function. This can make your code more concise. If you don’t want to use the library, you can also write that function definition directly. Though as a result, the code will be long and inconvenient to read.
Some libraries are already built in the Arduino IDE, when some others may need to be added. So now let’s see how to add them.
Open the Arduino IDE and go to Sketch -> Include Library -> Add .ZIP Library.
Navigate to the directory where the library files are located, such as the
kepler-kit-main\arduino\librariesfolder, and select the desired library file, like
LiquidCrystal_I2C.zip. Then, click Open.
After a short while, you will receive a notification indicating a successful installation.
Repeat the same process to add the other libraries.
The libraries installed can be found in the default library directory of the Arduino IDE, which is usually located at
If your library directory is different, you can check it by going to File -> Preferences.