From 122ace7af5647753f38f50e5a83474db4650e492 Mon Sep 17 00:00:00 2001 From: Maximilian Paulsen Date: Tue, 27 Feb 2024 10:07:36 +0100 Subject: [PATCH 1/3] Updates the library documentation. Feature `pio lib install` is deprecated and will be removed in the future: https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6b8546e..0e27032 100644 --- a/README.md +++ b/README.md @@ -165,29 +165,37 @@ This library requires standard library compatibility. Some boards such as Arduin ### Arduino 1. Download [Arduino IDE](http://www.arduino.cc/en/main/software) and setup the environment for ESP32 platform - - Follow [this guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html) - - Detailed Instructions for advanced users: [Arduino-ESP32](https://github.com/espressif/arduino-esp32) -2. Start the Arduino IDE and open the Library Manager by selecting `Sketch` -> `Include Library` -> `Manage Libraries...`. Search for the `Sensirion_Unified_Prototyping_Toolkit_Core` library in the `Filter your search...` field and install it by clicking the `install` button. + * Follow [this guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html) + * Detailed Instructions for advanced users: [Arduino-ESP32](https://github.com/espressif/arduino-esp32) +2. Start the Arduino IDE and open the Library Manager by selecting `Sketch` -> `Include Library` -> `Manage Libraries...`. Search for the `Sensirion UPT Core` library in the `Filter your search...` field and install it by clicking the `install` button. 3. Connect your ESP32 DevKit to your computer. 4. In the Arduino IDE, make sure you have the `ESP32 Dev Module` and the correct Port selected. 5. Select `File` -> `Examples` -> `Sensirion Gadget BLE Lib` -> **`BasicUsage`**. 6. Connect your board and click the upload button. +7. The Serial Monitor displays randomly generated mock Measurements. + +For users interested in the BLE en/decoding features, example script `BLE_example` is available. ### PlatformIO 1. To install the PlatformIO Core, follow the steps detailed [here](https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html). -2. Install the library using the terminal: - +2. Open this project in PlatformIO. +3. After you've conected your board, Compile, Upload and view Serial output or example script `BasicUsage` using the terminal: ```bash -pio lib install Sensirion_UPT_Core +pio run -t upload && pio device monitor ``` +4. The Serial Monitor displays randomly generated mock Measurements. -3. After you've conected your board, Compile, Upload and view Serial output using the terminal: - +For users interested in the BLE en/decoding features, example script `BLE_example` is available. It can be run with ```bash -pio run -t upload && pio device monitor +pio run -e ble_example -t upload && pio device monitor ``` -As of November '23, platformio cannot compile `.ino` files if they're in a subdirectory of the project directory. Thus, the example `.ino` file is copied to a `.cpp` file during the build process. +The example script will now display mock BLE advertisements in the console. + +To use this library in your project, add `Sensirion UPT Core` to your `lib_deps` in the `platformio.ini` file. + + +## License -The example script will now display mock sensor measurements in the console. +See [LICENSE](LICENSE). From 2514ec52e40ff0a30adff14aa60e847969dd1831 Mon Sep 17 00:00:00 2001 From: Maximilian Paulsen Date: Tue, 27 Feb 2024 12:44:06 +0100 Subject: [PATCH 2/3] Remove redundant project dependency --- platformio.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 0755dae..2cc0144 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,8 +18,6 @@ board = lilygo-t-display-s3 extra_scripts = pre:py_scripts/make_cpp_files.py monitor_speed = 115200 -lib_ldf_mode = deep -lib_extra_dirs = ${PROJECT_DIR}/src/ check_tool = cppcheck, clangtidy check_skip_packages = yes check_flags= From 9070400454728946f3515e6fee93124bcb4f0c68 Mon Sep 17 00:00:00 2001 From: Maximilian Paulsen Date: Tue, 27 Feb 2024 12:45:20 +0100 Subject: [PATCH 3/3] Remove gitlab ci --- .gitlab-ci.yml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 20b5479..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -stages: - - validate - - test - -style_check: - stage: validate - image: sensirion/embedded-ci:2.2.0 - tags: [linux, docker] - script: - - clang-format -i src/* --style=file - - git diff --exit-code - -lint_check: - stage: validate - image: sensirion/embedded-ci:2.2.0 - tags: [linux, docker] - script: - - cd /usr/local - - curl -fsSL https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/install.sh | sh - - arduino-lint /builds/MSO-SW/unified-prototyping-toolkit/upt-core --library-manager update - allow_failure: true - -cpp_check: - stage: validate - image: - name: registry.gitlab.sensirion.lokal/mso-sw/drivers/docker-driver-generator:0.1.0 - tags: [linux, docker] - script: - - cppcheck --std=c++11 --language=c++ --error-exitcode=1 --enable=warning,performance,portability src/* - -compile_test: - stage: test - image: - name: registry.gitlab.sensirion.lokal/sensirion/docker/docker-arduino:0.5.0 - tags: [docker, linux] - needs: [] - script: - - arduino-cli update - - mkdir -p /root/Arduino/libraries/ - - ln -s $PWD ~/Arduino/libraries/ - - arduino-cli compile --warnings all --fqbn esp32:esp32:esp32 examples/BasicUsage