From 429ed9e2f9c611456b30d4131935d33185f2ec27 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Wed, 20 Aug 2025 17:49:59 +0200 Subject: [PATCH 1/2] update github actions --- .github/workflows/arduino-lint.yml | 4 +-- .github/workflows/arduino_test_runner.yml | 2 +- .github/workflows/jsoncheck.yml | 4 ++- CHANGELOG.md | 5 +++ dhtnew.cpp | 2 +- dhtnew.h | 4 +-- .../dhtnew_adaptive_delay.ino | 1 + examples/dhtnew_array/dhtnew_array.ino | 1 + examples/dhtnew_debug/dhtnew_debug.ino | 1 + examples/dhtnew_dht11/dhtnew_dht11.ino | 1 + examples/dhtnew_dht22/.arduino-ci.yml | 31 +++++++++++++++++++ examples/dhtnew_dht22/dhtnew_dht22.ino | 1 + examples/dhtnew_endless/dhtnew_endless.ino | 4 +-- .../dhtnew_endless_debug.ino | 6 ++-- .../dhtnew_endless_insideFunction.ino | 6 ++-- examples/dhtnew_minimum/dhtnew_minimum.ino | 3 ++ .../dhtnew_minimum_insideFunction.ino | 3 ++ .../dhtnew_powerDown/dhtnew_powerDown.ino | 4 ++- .../dhtnew_pulse_diag/dhtnew_pulse_diag.ino | 5 +-- .../dhtnew_pulse_diag_ext.ino | 1 + examples/dhtnew_runtime/dhtnew_runtime.ino | 3 +- .../dhtnew_setReadDelay.ino | 1 + examples/dhtnew_simple/dhtnew_simple.ino | 1 + .../dhtnew_suppressError.ino | 6 ++-- examples/dhtnew_test/dhtnew_test.ino | 1 + .../dhtnew_waitForRead/dhtnew_waitForRead.ino | 2 +- .../dhtnew_waitForRead_nonBlocking.ino | 2 +- library.json | 2 +- library.properties | 2 +- 29 files changed, 84 insertions(+), 25 deletions(-) create mode 100644 examples/dhtnew_dht22/.arduino-ci.yml diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index 7f8f4ef..0ad60f4 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -6,8 +6,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: arduino/arduino-lint-action@v1 + - uses: actions/checkout@v5 + - uses: arduino/arduino-lint-action@v2 with: library-manager: update compliance: strict \ No newline at end of file diff --git a/.github/workflows/arduino_test_runner.yml b/.github/workflows/arduino_test_runner.yml index dbd0ce7..1897982 100644 --- a/.github/workflows/arduino_test_runner.yml +++ b/.github/workflows/arduino_test_runner.yml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 20 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: ruby-version: 2.6 diff --git a/.github/workflows/jsoncheck.yml b/.github/workflows/jsoncheck.yml index 1cbb5e2..8804e69 100644 --- a/.github/workflows/jsoncheck.yml +++ b/.github/workflows/jsoncheck.yml @@ -5,13 +5,15 @@ on: paths: - '**.json' pull_request: + paths: + - '**.json' jobs: test: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: json-syntax-check uses: limitusus/json-syntax-check@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 94fc3f2..0c074b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.5.4] - 2025-08-20 +- update github actions +- update examples +- minor edits + ## [0.5.3] - 2025-01-21 - update readme.md - fix for R4 - https://github.com/arduino/uno-r4-library-compatibility/issues/38 diff --git a/dhtnew.cpp b/dhtnew.cpp index 8b0c9ee..a0e741b 100644 --- a/dhtnew.cpp +++ b/dhtnew.cpp @@ -1,7 +1,7 @@ // // FILE: dhtnew.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.5.3 +// VERSION: 0.5.4 // PURPOSE: DHT Temperature & Humidity Sensor library for Arduino // URL: https://github.com/RobTillaart/DHTNEW // diff --git a/dhtnew.h b/dhtnew.h index 1f30056..b3ebe42 100644 --- a/dhtnew.h +++ b/dhtnew.h @@ -2,7 +2,7 @@ // // FILE: dhtnew.h // AUTHOR: Rob Tillaart -// VERSION: 0.5.3 +// VERSION: 0.5.4 // PURPOSE: DHT Temperature & Humidity Sensor library for Arduino // URL: https://github.com/RobTillaart/DHTNEW // @@ -18,7 +18,7 @@ #include "Arduino.h" -#define DHTNEW_LIB_VERSION (F("0.5.3")) +#define DHTNEW_LIB_VERSION (F("0.5.4")) #define DHTLIB_OK 0 diff --git a/examples/dhtnew_adaptive_delay/dhtnew_adaptive_delay.ino b/examples/dhtnew_adaptive_delay/dhtnew_adaptive_delay.ino index 5486618..a984064 100644 --- a/examples/dhtnew_adaptive_delay/dhtnew_adaptive_delay.ino +++ b/examples/dhtnew_adaptive_delay/dhtnew_adaptive_delay.ino @@ -32,6 +32,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_adaptive_delay.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_array/dhtnew_array.ino b/examples/dhtnew_array/dhtnew_array.ino index 1694380..488cf13 100644 --- a/examples/dhtnew_array/dhtnew_array.ino +++ b/examples/dhtnew_array/dhtnew_array.ino @@ -28,6 +28,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_array.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_debug/dhtnew_debug.ino b/examples/dhtnew_debug/dhtnew_debug.ino index 261ad49..729f212 100644 --- a/examples/dhtnew_debug/dhtnew_debug.ino +++ b/examples/dhtnew_debug/dhtnew_debug.ino @@ -21,6 +21,7 @@ DHTNEW mySensor(5); // ESP 16 UNO 5 MKR1010 5 void setup() { Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_debug.ino"); Serial.print("DHTNEW_LIB_VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_dht11/dhtnew_dht11.ino b/examples/dhtnew_dht11/dhtnew_dht11.ino index a2b221c..0141aca 100644 --- a/examples/dhtnew_dht11/dhtnew_dht11.ino +++ b/examples/dhtnew_dht11/dhtnew_dht11.ino @@ -23,6 +23,7 @@ void setup() while (!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_dht11.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_dht22/.arduino-ci.yml b/examples/dhtnew_dht22/.arduino-ci.yml new file mode 100644 index 0000000..c88d9a5 --- /dev/null +++ b/examples/dhtnew_dht22/.arduino-ci.yml @@ -0,0 +1,31 @@ +platforms: + rpipico: + board: rp2040:rp2040:rpipico + package: rp2040:rp2040 + gcc: + features: + defines: + - ARDUINO_ARCH_RP2040 + warnings: + flags: + +packages: + rp2040:rp2040: + url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + +compile: + # Choosing to run compilation tests on 2 different Arduino platforms + platforms: + - uno + # - due + # - zero + # - leonardo + - m4 + - esp32 + - esp8266 + # - mega2560 + - rpipico + + libraries: + - "DHTNew" + diff --git a/examples/dhtnew_dht22/dhtnew_dht22.ino b/examples/dhtnew_dht22/dhtnew_dht22.ino index dcbaefe..8be28c1 100644 --- a/examples/dhtnew_dht22/dhtnew_dht22.ino +++ b/examples/dhtnew_dht22/dhtnew_dht22.ino @@ -23,6 +23,7 @@ void setup() while (!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_dht22.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_endless/dhtnew_endless.ino b/examples/dhtnew_endless/dhtnew_endless.ino index 5667550..a91fa67 100644 --- a/examples/dhtnew_endless/dhtnew_endless.ino +++ b/examples/dhtnew_endless/dhtnew_endless.ino @@ -2,8 +2,7 @@ // FILE: DHT_endless.ino // AUTHOR: Rob Tillaart // PURPOSE: demo -// DATE: 2020-06-04 -// (c) : MIT +// URL: https://github.com/RobTillaart/DHTNEW // DHT PIN layout from left to right // ================================= @@ -29,6 +28,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("DHT_endless.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_endless_debug/dhtnew_endless_debug.ino b/examples/dhtnew_endless_debug/dhtnew_endless_debug.ino index 79e8d02..7f0ffac 100644 --- a/examples/dhtnew_endless_debug/dhtnew_endless_debug.ino +++ b/examples/dhtnew_endless_debug/dhtnew_endless_debug.ino @@ -2,8 +2,7 @@ // FILE: DHT_endless_debug.ino // AUTHOR: Rob Tillaart // PURPOSE: demo -// DATE: 2020-06-04 -// (c) : MIT +// URL: https://github.com/RobTillaart/DHTNEW // make _bits public + disable CRC check to run this program. @@ -32,7 +31,8 @@ void setup() while (!Serial); // MKR1010 needs this Serial.begin(115200); - Serial.println("DHT_endless.ino"); + Serial.println(); + Serial.println("DHT_endless_debug.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); Serial.println(); diff --git a/examples/dhtnew_endless_insideFunction/dhtnew_endless_insideFunction.ino b/examples/dhtnew_endless_insideFunction/dhtnew_endless_insideFunction.ino index a7eb61d..e1db7b9 100644 --- a/examples/dhtnew_endless_insideFunction/dhtnew_endless_insideFunction.ino +++ b/examples/dhtnew_endless_insideFunction/dhtnew_endless_insideFunction.ino @@ -2,8 +2,7 @@ // FILE: dhtnew_endless_insideFunction.ino // AUTHORS: Rob Tillaart, Vladislaw Kuzmin // PURPOSE: Demonstration example of endless DHT values' reporting in a function -// DATE: 2021-02-19 -// (c) : MIT +// URL: https://github.com/RobTillaart/DHTNEW // DHT PINs' layout from left to right // ================================= @@ -28,7 +27,8 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); - Serial.println("DHT_endless.ino"); + Serial.println(); + Serial.println("dhtnew_endless_insideFunction.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); Serial.println(); diff --git a/examples/dhtnew_minimum/dhtnew_minimum.ino b/examples/dhtnew_minimum/dhtnew_minimum.ino index 1452195..c766b13 100644 --- a/examples/dhtnew_minimum/dhtnew_minimum.ino +++ b/examples/dhtnew_minimum/dhtnew_minimum.ino @@ -23,7 +23,10 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println(__FILE__); + Serial.print("LIBRARY VERSION: "); + Serial.println(DHTNEW_LIB_VERSION); Serial.println(); // MKR1010 needs this + Arduino R4 diff --git a/examples/dhtnew_minimum_insideFunction/dhtnew_minimum_insideFunction.ino b/examples/dhtnew_minimum_insideFunction/dhtnew_minimum_insideFunction.ino index da0b3b2..13925c3 100644 --- a/examples/dhtnew_minimum_insideFunction/dhtnew_minimum_insideFunction.ino +++ b/examples/dhtnew_minimum_insideFunction/dhtnew_minimum_insideFunction.ino @@ -23,7 +23,10 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println(__FILE__); + Serial.print("LIBRARY VERSION: "); + Serial.println(DHTNEW_LIB_VERSION); Serial.println(); } diff --git a/examples/dhtnew_powerDown/dhtnew_powerDown.ino b/examples/dhtnew_powerDown/dhtnew_powerDown.ino index 285cee6..eb5fe25 100644 --- a/examples/dhtnew_powerDown/dhtnew_powerDown.ino +++ b/examples/dhtnew_powerDown/dhtnew_powerDown.ino @@ -27,9 +27,11 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); - Serial.println("dhtnew_test.ino"); + Serial.println(); + Serial.println("dhtnew_powerDown.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); + Serial.println(); // MKR1010 needs this // mySensor.setDisableIRQ(false); diff --git a/examples/dhtnew_pulse_diag/dhtnew_pulse_diag.ino b/examples/dhtnew_pulse_diag/dhtnew_pulse_diag.ino index 7b594d1..1146fdd 100644 --- a/examples/dhtnew_pulse_diag/dhtnew_pulse_diag.ino +++ b/examples/dhtnew_pulse_diag/dhtnew_pulse_diag.ino @@ -31,6 +31,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_pulse_diag.ino"); Serial.println(); @@ -104,7 +105,7 @@ void dump() void measure() { count++; - // yield(); // handle pending interrupts + // yield(); // handle pending interrupts // reset measurements table idx = 0; @@ -125,7 +126,7 @@ void measure() pinMode(_dataPin, INPUT_PULLUP); // DISABLE INTERRUPTS when clock in the bits - // noInterrupts(); // gives problems on AVR + // noInterrupts(); // gives problems on AVR times[idx++] = micros(); diff --git a/examples/dhtnew_pulse_diag_ext/dhtnew_pulse_diag_ext.ino b/examples/dhtnew_pulse_diag_ext/dhtnew_pulse_diag_ext.ino index a6c2f65..f39e5ed 100644 --- a/examples/dhtnew_pulse_diag_ext/dhtnew_pulse_diag_ext.ino +++ b/examples/dhtnew_pulse_diag_ext/dhtnew_pulse_diag_ext.ino @@ -34,6 +34,7 @@ void setup() while (!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_pulse_diag_ext.ino"); Serial.println(); diff --git a/examples/dhtnew_runtime/dhtnew_runtime.ino b/examples/dhtnew_runtime/dhtnew_runtime.ino index e941649..856a8e6 100644 --- a/examples/dhtnew_runtime/dhtnew_runtime.ino +++ b/examples/dhtnew_runtime/dhtnew_runtime.ino @@ -25,13 +25,14 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println(__FILE__); Serial.print("DHTNEW_LIB_VERSION: "); Serial.println(DHTNEW_LIB_VERSION); + Serial.println(); // MKR1010 needs this // mySensor.setDisableIRQ(false); - } diff --git a/examples/dhtnew_setReadDelay/dhtnew_setReadDelay.ino b/examples/dhtnew_setReadDelay/dhtnew_setReadDelay.ino index 24e2a1d..92baac2 100644 --- a/examples/dhtnew_setReadDelay/dhtnew_setReadDelay.ino +++ b/examples/dhtnew_setReadDelay/dhtnew_setReadDelay.ino @@ -23,6 +23,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println(__FILE__); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_simple/dhtnew_simple.ino b/examples/dhtnew_simple/dhtnew_simple.ino index 0097043..ac324fc 100644 --- a/examples/dhtnew_simple/dhtnew_simple.ino +++ b/examples/dhtnew_simple/dhtnew_simple.ino @@ -23,6 +23,7 @@ void setup() while (!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_simple.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_suppressError/dhtnew_suppressError.ino b/examples/dhtnew_suppressError/dhtnew_suppressError.ino index ec413a3..9e9359c 100644 --- a/examples/dhtnew_suppressError/dhtnew_suppressError.ino +++ b/examples/dhtnew_suppressError/dhtnew_suppressError.ino @@ -27,8 +27,10 @@ void setup() { while(!Serial); // MKR1010 needs this - Serial.begin(115200); - Serial.println(__FILE__); + Serial.println(); + Serial.println("dhtnew_suppressError.ino"); + Serial.print("LIBRARY VERSION: "); + Serial.println(DHTNEW_LIB_VERSION); Serial.println(); // MKR1010 needs this diff --git a/examples/dhtnew_test/dhtnew_test.ino b/examples/dhtnew_test/dhtnew_test.ino index 3bdc59b..91349cc 100644 --- a/examples/dhtnew_test/dhtnew_test.ino +++ b/examples/dhtnew_test/dhtnew_test.ino @@ -23,6 +23,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); + Serial.println(); Serial.println("dhtnew_test.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_waitForRead/dhtnew_waitForRead.ino b/examples/dhtnew_waitForRead/dhtnew_waitForRead.ino index 8e2c6d0..9d8624e 100644 --- a/examples/dhtnew_waitForRead/dhtnew_waitForRead.ino +++ b/examples/dhtnew_waitForRead/dhtnew_waitForRead.ino @@ -23,7 +23,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); - Serial.println("\n"); + Serial.println(); Serial.println("dhtnew_waitForRead.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/examples/dhtnew_waitForRead_nonBlocking/dhtnew_waitForRead_nonBlocking.ino b/examples/dhtnew_waitForRead_nonBlocking/dhtnew_waitForRead_nonBlocking.ino index a7e81f2..d6ecbbd 100644 --- a/examples/dhtnew_waitForRead_nonBlocking/dhtnew_waitForRead_nonBlocking.ino +++ b/examples/dhtnew_waitForRead_nonBlocking/dhtnew_waitForRead_nonBlocking.ino @@ -23,7 +23,7 @@ void setup() while(!Serial); // MKR1010 needs this Serial.begin(115200); - Serial.println("\n"); + Serial.println(); Serial.println("dhtnew_waitForRead_nonBlocking.ino"); Serial.print("LIBRARY VERSION: "); Serial.println(DHTNEW_LIB_VERSION); diff --git a/library.json b/library.json index 754e124..f3c275b 100644 --- a/library.json +++ b/library.json @@ -13,7 +13,7 @@ "type": "git", "url": "https://github.com/RobTillaart/DHTNEW.git" }, - "version": "0.5.3", + "version": "0.5.4", "license": "MIT", "frameworks": "*", "platforms": "*", diff --git a/library.properties b/library.properties index 1bd1fb4..9157fa9 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=DHTNEW -version=0.5.3 +version=0.5.4 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library for DHT temperature and humidity sensor, with automatic sensortype recognition. From bef0ebeaf1b5715278ecc18617e875de36824054 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Wed, 20 Aug 2025 19:08:56 +0200 Subject: [PATCH 2/2] update github actions --- examples/dhtnew_dht22/.arduino-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/dhtnew_dht22/.arduino-ci.yml b/examples/dhtnew_dht22/.arduino-ci.yml index c88d9a5..77a333f 100644 --- a/examples/dhtnew_dht22/.arduino-ci.yml +++ b/examples/dhtnew_dht22/.arduino-ci.yml @@ -26,6 +26,3 @@ compile: # - mega2560 - rpipico - libraries: - - "DHTNew" -