Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added PIO workflow #4

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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
Loading