Skip to content

Commit

Permalink
Merge pull request #4 from Sensirion/pio-ci
Browse files Browse the repository at this point in the history
added PIO workflow
  • Loading branch information
qfisch authored Feb 27, 2024
2 parents 8f387ed + 17e4b8a commit 465cd09
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 71 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Arduino Lib

on:
pull_request:
branches:
- master

jobs:
arduino-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1

arduino-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Arduino-CI/action@stable-1.x
env:
EXPECT_EXAMPLES: true
39 changes: 39 additions & 0 deletions .github/workflows/platformio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PIO Lib

on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
PlatformIO-Check:
uses: sensirion/.github/.github/workflows/platformio_check.yml@main
with:
pio-environment-list: '["basicUsage", "advancedUsage", "hacksterExample"]'

PlatformIO-Build:
uses: sensirion/.github/.github/workflows/platformio_build.yml@main
needs: PlatformIO-Check
with:
pio-environment-list: '["basicUsage", "advancedUsage", "hacksterExample"]'

PlatformIO-Package:
if: ${{ (github.ref_type != 'tag') && (github.ref_name == 'master') }}
needs: PlatformIO-Build
uses: sensirion/.github/.github/workflows/platformio_publish.yml@main
with:
should-publish: false

PlatformIO-Publish:
uses: sensirion/.github/.github/workflows/platformio_publish.yml@main
if: github.ref_type == 'tag'
needs: PlatformIO-Build
with:
should-publish: true
secrets:
pio-registry-token: ${{ secrets.PIO_MKTSW_TOKEN }}
68 changes: 0 additions & 68 deletions .gitlab-ci.yml

This file was deleted.

10 changes: 8 additions & 2 deletions examples/advancedUsage/advancedUsage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ perform commands. Thus, only use the driver to perform actions not handled by
the sensor manager.
*/

#include "Sensirion_upt_i2c_auto_detection.h"
#include "SensirionI2CScd4x.h"
#include "Arduino.h"
#include "SensirionI2CScd4x.h"
#include "Sensirion_upt_i2c_auto_detection.h"
#include <cmath>

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

if (error != NO_ERROR) {
Serial.print("Encountered error while getting sensor driver (code ");
Serial.print(error);
Serial.println(")");
}

// Set custom interval for sensor measurement update (default: 5s, lower
// values are ignored)
sensorManager.setInterval(7500, SensorType::SCD4X);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ sentence=Automatically detects Sensirion Sensors on an I2C bus and reads out mea
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.
category=Sensors
architectures=esp32
url=
url=https://github.com/Sensirion/arduino-upt-i2c-auto-detection
includes=Sensirion_upt_i2c_auto_detection.h
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 comments on commit 465cd09

Please sign in to comment.