IMPORTANT – Manual installation of the TFT_eSPI library is required
Manual installation:
- Download and extract the attached ZIP file.
- Go to your Library folder and put the TFT_eSPI folder there:
-
Linux:
/home/{brugernavn}/Arduino/Libraries -
Windows:
C:\Users\{brugernavn}\Documents\Arduino\Libraries -
MacOS:
/Users/{brugernavn}/Documents/Arduino/Libraries
-
Linux:
- Download the ZIP file at the bottom of the lesson (if available).
List of required components:
![]() |
AHT10 high-precision temperature and humidity sensor |
![]() |
TTGO T-Display ESP32 16MB with WiFi, Bluetooth and 1.1" color LCD screen |
![]() |
Dupont cables, 40 pcs |
Lesson objectives
The purpose of this lesson is to help you understand the concept of libraries in Arduino IDE, their importance in simplifying code, and how to install and manage them correctly. This will provide the foundation for working with more complex components later in the course, such as sensors and displays, by using the libraries' functions.
What are libraries?
In Arduino programming, libraries are collections of prewritten code that make it easier to implement features without starting entirely from scratch. Instead of reinventing the wheel, libraries handle complex, low-level operations so you can focus on the logic of your program.
Examples:
- TFT displays: A library handles communication with the screen, so you do not have to write the low-level code that interacts with the display controller yourself.
- WiFi connections: There is also no need to write code manually to establish a network connection — WiFi libraries can automate that process.
In short, libraries help you focus on your project rather than the hardware details.
Step 1: Accessing the Library Manager in Arduino IDE
The Library Manager is an important feature in Arduino IDE. It is a repository of libraries that makes it easy to search for, install, and manage libraries for your projects.
-
Open the Library Manager:
- In Arduino IDE, click the Sketch menu, then Include Library, and finally Manage Libraries…. This opens the Library Manager window.
-
Searching for libraries:
- At the top of the Library Manager window is a search bar. For example, if you want to control a TFT display, you can search for the TFT_eSPI library.
-
Installing libraries:
- When you find the library you need, click on it. An Install button appears. Click the button to install the library in your Arduino environment.
- You can then use the library in your code by including it in your sketch with
#include.
This process saves you from manually downloading and placing libraries in your Arduino folder and makes your workflow more efficient.
Step 2: Importing and using libraries
Once you have installed the necessary libraries via the Library Manager, you can include them in your sketches using the #include directive at the top of the code. This tells the compiler to retrieve the library and its associated functions.
Here are some examples of how to include important libraries for this project:
About the measurements: The station in this series measures temperature and relative humidity using the AHT10. These are indoor climate readings, not direct measurements of CO2, VOCs, or particles. The series name “air quality monitoring” should be understood with this limitation.


