-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Sensirion/Ready4Release
Ready4 release
- Loading branch information
Showing
15 changed files
with
146 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright 2024 Sensirion AG | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation and/or | ||
other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors | ||
may be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,81 @@ | ||
# Arduino BLE Client Library for Sensirion Gadgets | ||
# Arduino Sensirion UPT BLE Auto Detection | ||
|
||
This library enables you to retrieve live measurements form your own Do-It-Yourself BLE enabled sensor gadget or most Sensirion Gadgets on the ESP32 platform. | ||
|
||
## Supported Gadgets | ||
* AQ Minion | ||
* MyCO2 | ||
* SHT3X Gadget | ||
* SHT40 Gadget | ||
* SHT43 Gadget | ||
* [DIY BLE Gadget](https://github.com/Sensirion/arduino-ble-gadget) | ||
|
||
### Key features are | ||
|
||
**Please see the examples provided as reference on how to use this library.** | ||
**Please see [the example provided as reference](examples/GetLiveValues/GetLiveValues.ino) on how to use this library.** | ||
|
||
## How to use | ||
### Recommended Hardware | ||
|
||
This project was developed and tested on Espressif [ESP32 DevKitC](https://www.espressif.com/en/products/devkits/esp32-devkitc) hardware (see e.g. [ESP32-DevKitC-32D](https://www.digikey.com/en/products/detail/espressif-systems/ESP32-DEVKITC-32D/9356990)) | ||
This project was developed and tested on Espressif [ESP32 DevKitC](https://www.espressif.com/en/products/devkits/esp32-devkitc) hardware (see e.g. [ESP32-DevKitC-32D](https://www.digikey.com/en/products/detail/espressif-systems/ESP32-DEVKITC-32D/9356990)). | ||
This library requires standard library compatibility. Some boards such as Arduino AVR Uno do not ship with this functionnality. | ||
|
||
### Arduino | ||
Install the software from the [official website](https://www.arduino.cc/en/software) and read [this short tutorial](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started-ide-v2/) to get an introduction to the IDE. | ||
Next, select your board and port in the Board Manager by following [these instructions](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE). | ||
|
||
This library can be installed easily using the Arduino Library manager: | ||
Start the [Arduino IDE](http://www.arduino.cc/en/main/software) and open the Library Manager via | ||
|
||
Sketch => Include Library => Manage Libraries... | ||
|
||
Search for the `Sensirion UPT BLE Auto Detection` library in the `Filter your search...` field and install it by clicking the `install` button. Make sure to click "Install All", lest you'll have to manually search for and install the dependencies: | ||
* [NimBLE-Arduino](https://www.arduino.cc/reference/en/libraries/nimble-arduino/). | ||
* [Sensirion UPT Core](https://www.arduino.cc/reference/en/libraries/sensirion-upt-core/) | ||
|
||
Alternatively, the library can also be added manually. To do this, download the latest release from github as a .zip file via | ||
|
||
Code => Download Zip | ||
|
||
and add it to the [Arduino IDE](http://www.arduino.cc/en/main/software) via | ||
|
||
Sketch => Include Library => Add .ZIP Library... | ||
|
||
## Repository Contents | ||
In this second case, you'll have to also add all dependencies the same way. | ||
|
||
* **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. | ||
* **/src** - Source files for the library (.cpp, .h). | ||
* **library.properties** - General library properties for the Arduino package manager. | ||
### PlatformIO | ||
An often more straightforward alternative to the Arduino IDE is the PlatformIO framework, which is the recommended approach on Linux/Unix systems and is detailed in the following. | ||
|
||
The most straight-forward way to use [PlatformIO](https://platformio.org/platformio-ide) is as an extension to Microsoft's [Visual Studio Code](https://code.visualstudio.com/), you'll find it easily among the extensions available for it. Please refer to the official installation instructions [here](https://platformio.org/install/ide?install=vscode). | ||
|
||
To use the library, add the following dependencies to your `platformio.ini`'s `lib_deps`: | ||
|
||
```control | ||
lib_deps = | ||
Sensirion UPT BLE Auto Detection | ||
``` | ||
PlatformIO will automatically fetch the latest version of the dependencies during the build process. | ||
|
||
Alternatively, to install this library in your project environment execute the following command in a terminal: | ||
```bash | ||
pio pkg install --library "Sensirion UPT BLE Auto Detection" | ||
``` | ||
|
||
To test the default example (`GetLiveValues`), use the following platformio command from the project's root directory (the one containing the `platformio.ini` file): | ||
```bash | ||
pio run -t upload | ||
``` | ||
and start the Serial monitor with | ||
```bash | ||
pio device monitor | ||
``` | ||
|
||
In case you're using some other board, it is recommended you create a new environment in the `platformio.ini` file, using the existing environment as a template. Find your `board` parameter [here](https://docs.platformio.org/en/latest/boards/index.html). | ||
|
||
## License | ||
|
||
See [LICENSE](LICENSE.txt). | ||
|
||
## Credits | ||
|
||
https://github.com/MBjoern/arduino-ble-sensiscan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
####################################### | ||
# Syntax Coloring Map | ||
####################################### | ||
|
||
####################################### | ||
# Datatypes (KEYWORD1) | ||
####################################### | ||
|
||
SensiScan KEYWORD1 | ||
|
||
####################################### | ||
# Methods and Functions (KEYWORD2) | ||
####################################### | ||
begin KEYWORD2 | ||
getScanResults KEYWORD2 | ||
keepAlive KEYWORD2 | ||
|
||
###################################### | ||
# Constants (LITERAL1) | ||
####################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name=BLE Client for Sensirion Gadgets | ||
name=Sensirion UPT BLE Auto Detection | ||
version=0.1.0 | ||
author=Bjoern Muntwyler | ||
maintainer=Bjoern Muntwyler | ||
sentence=Library to get live values from Sensirion Gadgets using BLE on ESP32. | ||
paragraph=Library to get live values from Sensirion Gadgets using BLE on ESP32. | ||
category=Communication | ||
url=https://github.com/MBjoern/arduino-ble-sensiscan | ||
architectures=* | ||
depends=NimBLE-Arduino | ||
|
||
author=Bjoern Muntwyler, Maximilian Paulsen | ||
maintainer=Sensirion AG <sensirion.com> | ||
sentence=Automatically detects Sensirion Gadgets via Bluetooth and reads out measurement data. | ||
paragraph=Automatically detects Sensirion Gadgets via Bluetooth and reads out measurement data. | ||
category=Communication, Sensors | ||
url= | ||
architectures=esp32 | ||
depends=NimBLE-Arduino, Sensirion UPT Core | ||
includes=Sensirion_upt_ble_auto_detection.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
src/ArduinoBleSensiScan.cpp → src/Sensirion_upt_ble_auto_detection.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters