Skip to content

Commit

Permalink
add changelog.md (#12)
Browse files Browse the repository at this point in the history
* add changelog.md
* fix version
  • Loading branch information
RobTillaart authored Nov 2, 2022
1 parent 6bf6b89 commit 2d2991a
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 29 deletions.
22 changes: 21 additions & 1 deletion .arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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



23 changes: 7 additions & 16 deletions DS18B20_INT.cpp
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
//
// FILE: DS18B20_INT.cpp
// AUTHOR: [email protected]
// 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
Expand Down Expand Up @@ -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;
Expand Down
18 changes: 9 additions & 9 deletions DS18B20_INT.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
//
// FILE: DS18B20_INT.h
// AUTHOR: [email protected]
// 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)
// URL: https://github.com/RobTillaart/DS18B20_INT
// 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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"version": "^2.3.5"
}
],
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",
"frameworks": "arduino",
"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=DS18B20_int
version=0.2.0
version=0.2.1
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Library for DS18B20 restricted to a single sensor per pin.
Expand Down

0 comments on commit 2d2991a

Please sign in to comment.