From 2d2991a14006e528799cccc648e3fefd74ee8cd4 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Wed, 2 Nov 2022 15:10:57 +0100 Subject: [PATCH] add changelog.md (#12) * add changelog.md * fix version --- .arduino-ci.yml | 22 ++++++++++++++++++++- CHANGELOG.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++ DS18B20_INT.cpp | 23 +++++++--------------- DS18B20_INT.h | 18 ++++++++--------- README.md | 2 +- library.json | 2 +- library.properties | 2 +- 7 files changed, 89 insertions(+), 29 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.arduino-ci.yml b/.arduino-ci.yml index 7480149..5d63b91 100644 --- a/.arduino-ci.yml +++ b/.arduino-ci.yml @@ -1,10 +1,30 @@ +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 - - leonardo - due - zero + - leonardo + # - m4 + # - esp32 + # - esp8266 + # - mega2560 + - rpipico # Declaring Dependent Arduino Libraries (to be installed via the Arduino Library Manager) libraries: - "OneWire" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6be9315 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,49 @@ +# Change Log DistanceTable + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + + +## [0.2.1] - 2022-11-02 +- add changelog.md +- add rp2040 to build-CI + + +## [0.2.0] - 2022-06-23 +- fix #10 getTempCentiC() (thanks negroKiordi) +- fix reading sensor + +---- + +## [0.1.7] - 2021-12-17 +- update library.json +- update license +- minor edits + +## [0.1.6] - 2021-10-03 +- add dependency +- fix build-CI + +## [0.1.5] - 2021-06-16 +- add retries parameter to begin() + +## [0.1.4] - 2021-05-26 +- add OneWire.reset() to begin() + + +## [0.1.3] - 2020-12-20 +- add Arduino-CI + unit test + +## [0.1.2] - 2020-08-05 +- refactor +- sync with DS18B20 + +## [0.1.1] - 2019-??-?? + +## [0.1.0] - 2017-07-25 +- initial version + + + diff --git a/DS18B20_INT.cpp b/DS18B20_INT.cpp index 900b668..7d9927a 100644 --- a/DS18B20_INT.cpp +++ b/DS18B20_INT.cpp @@ -1,34 +1,25 @@ // // FILE: DS18B20_INT.cpp // AUTHOR: Rob.Tillaart@gmail.com -// VERSION: 0.2.0 +// VERSION: 0.2.1 // DATE: 2017-07-25 // PUPROSE: library for DS18B20 temperature sensor - integer only. // URL: https://github.com/RobTillaart/DS18B20_INT // https://github.com/RobTillaart/DS18B20_RT // -// HISTORY: -// 0.1.0 2017-07-25 initial version -// 0.1.1 2019- -// 0.1.2 2020-08-05 refactor / sync with DS18B20 -// 0.1.3 2020-12-20 add Arduino-CI + unit test -// 0.1.4 2021-05-26 add OneWire.reset() to begin() -// 0.1.5 2021-06-16 add retries parameter to begin() -// 0.1.6 2021-10-03 add dependency + fix build-CI -// 0.1.7 2021-12-17 update library.json, license, minor edits -// 0.2.0 2022-06-23 fix #10 getTempCentiC() (thanks negroKiordi) -// fix reading sensor +// HISTORY: see changelog.md #include "DS18B20_INT.h" -// OneWire commands + +// OneWire commands #define STARTCONVO 0x44 #define READSCRATCH 0xBE #define WRITESCRATCH 0x4E -// Device resolution +// Device resolution #define TEMP_9_BIT 0x1F // 9 bit #define TEMP_10_BIT 0x3F // 10 bit #define TEMP_11_BIT 0x5F // 11 bit @@ -61,10 +52,10 @@ bool DS18B20_INT::begin(uint8_t retries) _oneWire->reset(); _oneWire->select(_deviceAddress); _oneWire->write(WRITESCRATCH); - // two dummy values for LOW & HIGH ALARM + // two dummy values for LOW & HIGH ALARM _oneWire->write(0); _oneWire->write(100); - _oneWire->write(_resolution); // lowest as we do only integer math. + _oneWire->write(_resolution); // lowest as we do only integer math. _oneWire->reset(); } return _addressFound; diff --git a/DS18B20_INT.h b/DS18B20_INT.h index 5f5d2a0..f034e2c 100644 --- a/DS18B20_INT.h +++ b/DS18B20_INT.h @@ -2,7 +2,7 @@ // // FILE: DS18B20_INT.h // AUTHOR: Rob.Tillaart@gmail.com -// VERSION: 0.2.0 +// VERSION: 0.2.1 // DATE: 2017-07-25 // PUPROSE: Minimalistic library for DS18B20 temperature sensor // uses only integer math (no float to minimize footprint) @@ -10,18 +10,18 @@ // https://github.com/RobTillaart/DS18B20_RT // -// BOTTOM VIEW +// BOTTOM VIEW // -// PIN MEANING -// /---+ -// / o | 1 GND -// | o | 2 DATA -// \ o | 3 VCC -// \---+ +// PIN MEANING +// /---+ +// / o | 1 GND +// | o | 2 DATA +// \ o | 3 VCC +// \---+ // -#define DS18B20_INT_LIB_VERSION (F("0.2.0")) +#define DS18B20_INT_LIB_VERSION (F("0.2.1")) #include "Arduino.h" #include "OneWire.h" diff --git a/README.md b/README.md index df06e52..4bfdd4e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This DS18B20_INT library supports only the DS18B20, only one sensor per pin, no mode, no Fahrenheit and no alarm functions. The only feature the class supports is the asynchronous reading of the temperature by means of three core functions: -- **DS18B20_INT(OneWire *)** constructor needs a reference to OneWire object. +- **DS18B20_INT(OneWire \*)** constructor needs a reference to OneWire object. - **bool begin(uint8_t retries = 3)** resets oneWire and set resolution to 9 bit. returns true if all is OK. there will be a number of retries to connect, default 3. - **void requestTemperatures()** trigger temperature conversion. diff --git a/library.json b/library.json index dbb79c6..e5f23e6 100644 --- a/library.json +++ b/library.json @@ -23,7 +23,7 @@ "version": "^2.3.5" } ], - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "frameworks": "arduino", "platforms": "*", diff --git a/library.properties b/library.properties index a0060cc..0f50b89 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=DS18B20_int -version=0.2.0 +version=0.2.1 author=Rob Tillaart maintainer=Rob Tillaart sentence=Library for DS18B20 restricted to a single sensor per pin.