Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/arduino_test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/jsoncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dhtnew.cpp
Original file line number Diff line number Diff line change
@@ -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
//
Expand Down
4 changes: 2 additions & 2 deletions dhtnew.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_adaptive_delay/dhtnew_adaptive_delay.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_array/dhtnew_array.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_debug/dhtnew_debug.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_dht11/dhtnew_dht11.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
28 changes: 28 additions & 0 deletions examples/dhtnew_dht22/.arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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

1 change: 1 addition & 0 deletions examples/dhtnew_dht22/dhtnew_dht22.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions examples/dhtnew_endless/dhtnew_endless.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
// =================================
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions examples/dhtnew_endless_debug/dhtnew_endless_debug.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
// =================================
Expand All @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions examples/dhtnew_minimum/dhtnew_minimum.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 3 additions & 1 deletion examples/dhtnew_powerDown/dhtnew_powerDown.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions examples/dhtnew_pulse_diag/dhtnew_pulse_diag.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void setup()
while(!Serial); // MKR1010 needs this

Serial.begin(115200);
Serial.println();
Serial.println("dhtnew_pulse_diag.ino");
Serial.println();

Expand Down Expand Up @@ -104,7 +105,7 @@ void dump()
void measure()
{
count++;
// yield(); // handle pending interrupts
// yield(); // handle pending interrupts

// reset measurements table
idx = 0;
Expand All @@ -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();
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_pulse_diag_ext/dhtnew_pulse_diag_ext.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
3 changes: 2 additions & 1 deletion examples/dhtnew_runtime/dhtnew_runtime.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}


Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_setReadDelay/dhtnew_setReadDelay.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_simple/dhtnew_simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions examples/dhtnew_suppressError/dhtnew_suppressError.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions examples/dhtnew_test/dhtnew_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/dhtnew_waitForRead/dhtnew_waitForRead.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DHTNEW
version=0.5.3
version=0.5.4
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for DHT temperature and humidity sensor, with automatic sensortype recognition.
Expand Down