Library installation

To install the library you could clone the main repository where you can find the project and an application example.

1. Get the repository

To clone the repository you can follow the next steps:

git clone https://gitlab.com/projectlorawan-geolocalization/tleraboards/
cd tleraboards

2. Repository structure

The repository structure is as follows:

tleraboards/                    (main repository)
|--- .vscode/                   (visual code configuration)
|   |--- arduino.json
|   |--- c_cpp_properties.json
|   |--- settings.json
|--- cmake/                     (cmake module addition for sphinx)
|   |--- FindSphinx.cmake
|--- CMakeLists.txt             (main CMakeLists.txt file)
|--- docs/                      (documentation configuration folder)
|   |--- CMakeLists.txt         (cmake configuration for documentation)
|   |--- conf.py                (configuration for Sphinx)
|   |--- contents               (individual contents files)
|   |   |--- about.rst
|   |   |--- initialsteps.rst
|   |   |--- installationlibrary.rst
|   |--- Doxyfile.in            (Doxygen configuration)
|   |--- index.rst              (main documentation file)
|   |--- requirements.txt       (requirements for ReadTheDocs)
|--- LoRaDev.code-workspace
|--- src/                       (source code folder)
    |--- demo_cricket_lorawan_asset_tracker
       |--- ADXL345.cpp
       |--- ADXL345.h
       |--- BMA400.cpp
       |--- BMA400.h
       |--- BME280.cpp
       |--- BME280.h
       |--- BMP085.cpp
       |--- BMP085.h
       |--- boards.h
       |--- CMakeLists.txt      (cmake configuration for source)
       |--- commissioning.h
       |--- demo_cricket_lorawan_asset_tracker.ino (application example)
       |--- HMC5883L.cpp
       |--- HMC5883L.h
       |--- I2Cdev.cpp
       |--- I2Cdev.h
       |--- L3G4200D.cpp
       |--- L3G4200D.h
       |--- libraries
       |    |--- readme.txt
       |--- sensor_config.h
       |--- SensorsTlera.cpp    (main class source)
       |--- SensorsTlera.h      (main class header)
       |--- SPIFlash.cpp
       |--- SPIFlash.h

There are some important folders and files to take into account:

.vscode

This folder contains the configuration for the Visual Studio code These configurations are loaded when is opened with the IDE.

cmake

The documentation uses cmake to generate it locally, so in this folder there is a custom module which integrates sphinx with cmake.

docs

Is the documentation folder which contains all the files related to the documentation configuaration such as Doxygen and Sphinx files.

src

Contains the source code of the project, which includes the libraries and the application example usign them.

3. Loading the project in Visual Studio code

The project is prepared to be loaded by Visual Studio Code, so to accomplish this goal, you should follow the next steps:

  1. Open the Visual Studio Code.

  2. Go to File-> Open workspace

  3. In the file explorer, localize the LoRaDev.code-workspace file in the repository and Open it.

Once finished the last step, the whole project should be loaded into the IDE.

Then you can explore the following in the repository:

configuration files

These files are composed by commisioning.h, boards.h y sensor_config.h, which provides the configuration for the library and are discused in Configuration files

main library

The main library is composed by SensorsTlera.h and SensorsTlera.cpp which is explained in Sensors Tlera Documentation

application

The application example is the Arduino file which employs the library and other sensors considered here. It is explained in Application example.

documentation

The documentation files wich are used to build this web documentation and uses Sphinx and Doxygen, explored in Building documentation.