Skip to content

Commit 465cd09

Browse files
authored
Merge pull request #4 from Sensirion/pio-ci
added PIO workflow
2 parents 8f387ed + 17e4b8a commit 465cd09

File tree

5 files changed

+69
-71
lines changed

5 files changed

+69
-71
lines changed

.github/workflows/arduino.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Arduino Lib
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
arduino-lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: arduino/arduino-lint-action@v1
14+
15+
arduino-ci:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: Arduino-CI/[email protected]
20+
env:
21+
EXPECT_EXAMPLES: true

.github/workflows/platformio.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PIO Lib
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
tags:
11+
- "[0-9]+.[0-9]+.[0-9]+"
12+
13+
jobs:
14+
PlatformIO-Check:
15+
uses: sensirion/.github/.github/workflows/platformio_check.yml@main
16+
with:
17+
pio-environment-list: '["basicUsage", "advancedUsage", "hacksterExample"]'
18+
19+
PlatformIO-Build:
20+
uses: sensirion/.github/.github/workflows/platformio_build.yml@main
21+
needs: PlatformIO-Check
22+
with:
23+
pio-environment-list: '["basicUsage", "advancedUsage", "hacksterExample"]'
24+
25+
PlatformIO-Package:
26+
if: ${{ (github.ref_type != 'tag') && (github.ref_name == 'master') }}
27+
needs: PlatformIO-Build
28+
uses: sensirion/.github/.github/workflows/platformio_publish.yml@main
29+
with:
30+
should-publish: false
31+
32+
PlatformIO-Publish:
33+
uses: sensirion/.github/.github/workflows/platformio_publish.yml@main
34+
if: github.ref_type == 'tag'
35+
needs: PlatformIO-Build
36+
with:
37+
should-publish: true
38+
secrets:
39+
pio-registry-token: ${{ secrets.PIO_MKTSW_TOKEN }}

.gitlab-ci.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

examples/advancedUsage/advancedUsage.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ perform commands. Thus, only use the driver to perform actions not handled by
1717
the sensor manager.
1818
*/
1919

20-
#include "Sensirion_upt_i2c_auto_detection.h"
21-
#include "SensirionI2CScd4x.h"
2220
#include "Arduino.h"
21+
#include "SensirionI2CScd4x.h"
22+
#include "Sensirion_upt_i2c_auto_detection.h"
2323
#include <cmath>
2424

2525
I2CAutoDetector i2CAutoDetector(Wire);
@@ -53,6 +53,12 @@ void setup() {
5353
AutoDetectorError error = sensorManager.getSensorDriver<SensirionI2CScd4x>(
5454
pScd4xDriver, SensorType::SCD4X);
5555

56+
if (error != NO_ERROR) {
57+
Serial.print("Encountered error while getting sensor driver (code ");
58+
Serial.print(error);
59+
Serial.println(")");
60+
}
61+
5662
// Set custom interval for sensor measurement update (default: 5s, lower
5763
// values are ignored)
5864
sensorManager.setInterval(7500, SensorType::SCD4X);

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ sentence=Automatically detects Sensirion Sensors on an I2C bus and reads out mea
66
paragraph=Sensors can be read out collectively using a single method. The resulting data points include information about the sensor origin, units and the measurement timestamp.
77
category=Sensors
88
architectures=esp32
9-
url=
9+
url=https://github.com/Sensirion/arduino-upt-i2c-auto-detection
1010
includes=Sensirion_upt_i2c_auto_detection.h
1111
depends=Sensirion Core, Sensirion UPT Core, Sensirion I2C SCD4x, Sensirion I2C SFA3x, Sensirion I2C SVM4x, Sensirion I2C SHT4x, Sensirion I2C SEN5X, Sensirion I2C SCD30, Sensirion I2C SGP41, Sensirion I2C STC3x

0 commit comments

Comments
 (0)