Skip to content

Commit 5f6032a

Browse files
authored
update GitHub actions + examples (#20)
- update GitHub actions - update examples - minor edits
1 parent 3bd72c0 commit 5f6032a

File tree

16 files changed

+124
-38
lines changed

16 files changed

+124
-38
lines changed

.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: arduino/arduino-lint-action@v1
9+
- uses: actions/checkout@v6
10+
- uses: arduino/arduino-lint-action@v2
1111
with:
1212
library-manager: update
1313
compliance: strict

.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ jobs:
66
runTest:
77
runs-on: ubuntu-latest
88
timeout-minutes: 20
9-
109
steps:
11-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v6
1211
- uses: ruby/setup-ruby@v1
1312
with:
1413
ruby-version: 2.6

.github/workflows/jsoncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
paths:
66
- '**.json'
77
pull_request:
8+
paths:
9+
- '**.json'
810

911
jobs:
1012
test:
1113
runs-on: ubuntu-latest
1214
timeout-minutes: 5
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1517
- name: json-syntax-check
1618
uses: limitusus/json-syntax-check@v2
1719
with:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.3.4] - 2026-01-02
10+
- update GitHub actions
11+
- update examples
12+
- minor edits
13+
914
## [0.3.3] - 2024-06-27
1015
- add connectCheck parameter to getTempC()
1116
- update readme.md

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2024 Rob Tillaart
3+
Copyright (c) 2017-2026 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 70 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
# DS18B20_INT
1313

14-
Minimalistic library for the DS18B20 temperature sensor - restricted to one sensor per pin.
14+
Arduino library for the DS18B20 temperature sensor - restricted to one sensor per pin.
1515

1616

1717
## Arduino Temperature Control Library (ATCL)
1818

19-
This DS18B20 library is a minimalistic library for a DS18B20 sensor.
20-
It will give only temperatures in whole degrees C.
19+
This DS18B20 library is not a full featured library for the DS18B20 family.
20+
This library supports only one DS18B20 per Arduino/ MCU pin.
21+
Furthermore this library will give only temperatures in whole degrees C.
2122
Goal is to minimize footprint.
2223

2324
If you need more functions or control over the DS18B20 family I refer to the library
@@ -27,13 +28,64 @@ I'm a great fan of the above library however some time ago I needed to strip it
2728
to save a few dozen bytes. I reworked that minimalistic version into a library and I
2829
added a number of Arduino examples to help you get started.
2930

31+
Effort has been taken to keep the code, variables and function names compatible with
32+
ATCL library mentioned above. This way you can step over to that one with relatively
33+
few problems when you need more functionality like multiple sensors on one pin.
34+
35+
Finally this library will probably make it easier to use a DS18B20 with processing
36+
boards or IC's with small memory footprint.
37+
38+
Feedback, as always, is welcome.
39+
40+
41+
### Footprint OneWire
42+
43+
This library depends (is build) upon the **OneWire** library of Paul Stoffregen.
44+
- https://github.com/PaulStoffregen/OneWire - the reference imho.
45+
46+
In issue [#31](https://github.com/RobTillaart/DS18B20_RT/issues/31) the footprint of
47+
the OneWireNG seems to be smaller when build on platformIO.
48+
49+
So if you are in need to save some more bytes, you might try [OneWireNG]
50+
(https://github.com/pstolarz/OneWireNg).
51+
52+
53+
### Compatibles
3054

31-
#### Related
55+
| device | tested | power | bits | notes |
56+
|:-------------|:--------:|:---------:|:------:|:--------|
57+
| DS18B20 | yes | 3-5 V | 9-12 | the reference
58+
| DS18S20 | n | 3-5 V | 9 |
59+
| DS1822 | n | 3-5 V | 9-12 |
60+
| DS1820 | n | 5 V | 9 |
61+
| MAX31820 | n | 3 V | 9-12 |
3262

33-
This library is related to
34-
- https://github.com/RobTillaart/DS18B20_INT
35-
- https://github.com/RobTillaart/DS18B20_RT
63+
Not all tested, but expected to work. If there are missing devices or you have
64+
tested one, please let me know.
65+
66+
67+
### Related
68+
69+
This library is related to
70+
71+
- https://github.com/RobTillaart/DHTNew DHT11/22 etc
72+
- https://github.com/RobTillaart/DHTStable DHT11/22 etc
73+
- https://github.com/RobTillaart/DHT_Simulator
74+
- https://github.com/RobTillaart/DS18B20_INT OneWire temperature sensor
75+
- https://github.com/RobTillaart/DS18B20_RT OneWire temperature sensor
76+
- https://github.com/RobTillaart/DS18B21 OneWire temperature sensor (8 bit)
3677
- https://github.com/milesburton/Arduino-Temperature-Control-Library
78+
- https://github.com/milesburton/Arduino-Temperature-Control-Library/issues/244#event-9253126638
79+
- https://github.com/RobTillaart/PCT2075 11 bit I2C temperature sensor with thermal watchdog.
80+
- https://github.com/RobTillaart/SHT31 Sensirion humidity / temperature sensor
81+
- https://github.com/RobTillaart/SHT85 Sensirion humidity / temperature sensor
82+
- https://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.html (interesting)
83+
- https://github.com/RobTillaart/Temperature (conversions, dewPoint, heat index etc.)
84+
85+
86+
Dependency
87+
- https://github.com/PaulStoffregen/OneWire
88+
- https://github.com/pstolarz/OneWireNg (alternative)
3789

3890

3991
## Interface
@@ -43,7 +95,7 @@ This library is related to
4395
```
4496

4597

46-
#### Core
98+
### Constructor
4799

48100
This DS18B20_INT library supports only the DS18B20, only one sensor per pin, no parasite
49101
mode, no Fahrenheit and no alarm functions. The only feature the class supports is
@@ -55,6 +107,11 @@ Returns true if address / device is found and all is OK.
55107
There will be a number of retries to connect, default 3.
56108
- **bool isConnected(uint8_t retries = 3)** Returns true if address / device is found.
57109
There will be a number of retries to connect, default 3.
110+
- **bool getAddress(uint8_t \* buffer)** returns true if the sensor is configured (available).
111+
Buffer must be a byte array of at least 8 bytes.
112+
113+
### Core
114+
58115
- **void requestTemperatures()** trigger temperature conversion.
59116
- **bool isConversionComplete()** check if conversion is complete.
60117
- **int16_t getTempC(bool connectCheck = true)** returns temperature in whole degrees only.
@@ -63,7 +120,7 @@ Is faster when connectCheck is set to false. Default true = backwards compatible
63120
- **bool getAddress()** returns true if the sensor is configured (available).
64121

65122

66-
#### CentiC part
123+
### CentiC part
67124

68125
The following functions are experimental since 0.2.0 and not tested a lot by me.
69126
They allow to use a higher resolution while **not using floats**.
@@ -83,7 +140,7 @@ Note one might need to set the resolution to get more "decimals".
83140

84141
## Operation
85142

86-
This library supports only one DS18B20 per Arduino/ MCU pin.
143+
This library supports only **one** DS18B20 per Arduino/ MCU pin.
87144

88145
```
89146
// BOTTOM VIEW
@@ -101,7 +158,7 @@ Connect a pull-up resistor 4.7 KOhm between pin3 and pin2.
101158
When the wires are longer this resistor needs to be smaller.
102159

103160

104-
#### -127 and 85
161+
### -127 and 85
105162

106163
Two specific return values from reading the sensor:
107164

@@ -110,7 +167,7 @@ Two specific return values from reading the sensor:
110167
If you get this unexpected it may indicate a power problem
111168

112169

113-
#### Pull up resistor
170+
### Pull up resistor
114171

115172
An **indicative** table for pull up resistors, (E12 series), to get started.
116173

@@ -156,6 +213,7 @@ and all people who contributed to that library.
156213

157214
#### Must
158215

216+
- improve documentation
159217
- elaborate performance connected state.
160218

161219
#### Should

examples/DS18B20_INT/DS18B20_INT.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ uint32_t start, stop;
1919
void setup()
2020
{
2121
Serial.begin(115200);
22+
Serial.println();
2223
Serial.println(__FILE__);
2324
Serial.print("DS18B20_INT_LIB_VERSION: ");
2425
Serial.println(DS18B20_INT_LIB_VERSION);
26+
Serial.println();
27+
delay(10);
2528

2629
sensor.begin();
2730
}

examples/DS18B20_INT_getTempCentiC/DS18B20_INT_getTempCentiC.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ uint32_t start, stop;
2020
void setup()
2121
{
2222
Serial.begin(115200);
23+
Serial.println();
2324
Serial.println(__FILE__);
2425
Serial.print("DS18B20_INT_LIB_VERSION: ");
2526
Serial.println(DS18B20_INT_LIB_VERSION);
27+
Serial.println();
28+
delay(10);
2629

2730
sensor.begin();
2831
sensor.setResolution(12);

examples/DS18B20_getAddress/DS18B20_getAddress.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ DeviceAddress da;
1919
void setup()
2020
{
2121
Serial.begin(115200);
22+
Serial.println();
2223
Serial.println(__FILE__);
2324
Serial.print("DS18B20_INT_LIB_VERSION: ");
2425
Serial.println(DS18B20_INT_LIB_VERSION);
26+
Serial.println();
27+
delay(10);
2528

2629
Serial.print("\ngetAddress: ");
2730
Serial.println(sensor.getAddress(da));

examples/DS18B20_minimum/DS18B20_minimum.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ DS18B20_INT sensor(&oneWire);
2222
void setup(void)
2323
{
2424
Serial.begin(115200);
25+
Serial.println();
2526
Serial.println(__FILE__);
2627
Serial.print("DS18B20_INT_LIB_VERSION: ");
2728
Serial.println(DS18B20_INT_LIB_VERSION);
29+
Serial.println();
30+
delay(10);
2831

2932
sensor.begin();
3033
}

0 commit comments

Comments
 (0)