0.3.1 DS18B20_INT

This commit is contained in:
Rob Tillaart 2023-10-19 17:26:48 +02:00
parent f3721c494d
commit 873221a394
7 changed files with 53 additions and 11 deletions

View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.1] - 2023-10-19
- update readme.md
## [0.3.0] - 2023-03-05
- fix #15 infinite loop
- move sources to src folder to comply with PlatformIO dependency system.
@ -14,7 +18,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- update readme.md
- fix changelog.md
----
## [0.2.2] - 2023-02-03

View File

@ -2,8 +2,11 @@
[![Arduino CI](https://github.com/RobTillaart/DS18B20_INT/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/DS18B20_INT/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/DS18B20_INT/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/DS18B20_INT/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/DS18B20_INT/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/DS18B20_INT.svg)](https://github.com/RobTillaart/DS18B20_INT/issues)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/DS18B20_INT/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/DS18B20_INT.svg?maxAge=3600)](https://github.com/RobTillaart/DS18B20_INT/releases)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/DS18B20_INT.svg)](https://registry.platformio.org/libraries/robtillaart/DS18B20_INT)
# DS18B20_INT
@ -176,3 +179,12 @@ and all people who contributed to that lib.
- unit tests
- get it working is too time consuming.
## Support
If you appreciate my libraries, you can support the development and maintenance.
Improve the quality of the libraries by providing issues and Pull Requests, or
donate through PayPal or GitHub sponsors.
Thank you,

View File

@ -1,14 +1,31 @@
//
// FILE: oneWireSearch.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.5
// PURPOSE: scan for 1-Wire devices + code snippet generator
// DATE: 2015-june-30
// URL: http://forum.arduino.cc/index.php?topic=333923
// URL: https://github.com/RobTillaart/DS18B20_RT
// URL: http://forum.arduino.cc/index.php?topic=333923
//
// inspired by http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html
//
// HISTORY
// 0.1.00 initial version
// 0.1.01 first published version
// 0.1.02 small output changes
// 0.1.03 added more explicit range
// 0.1.04 added CRC check
// 0.1.5 fix do while loop (thanks pzygielo)
// UNO has pin 2..20
// MEGA and others have different range
const int startPin = 2;
const int endPin = 20;
#include <OneWire.h>
@ -18,7 +35,7 @@ void setup()
Serial.begin(115200);
Serial.println("//\n// Start oneWireSearch.ino \n//");
for (uint8_t pin = 2; pin < 13; pin++)
for (uint8_t pin = startPin; pin < endPin; pin++)
{
findDevices(pin);
}
@ -43,7 +60,8 @@ uint8_t findDevices(int pin)
Serial.print("\nuint8_t pin");
Serial.print(pin, DEC);
Serial.println("[][8] = {");
do {
do
{
count++;
Serial.println(" {");
for (uint8_t i = 0; i < 8; i++)
@ -53,7 +71,16 @@ uint8_t findDevices(int pin)
Serial.print(address[i], HEX);
if (i < 7) Serial.print(", ");
}
Serial.println(" },");
Serial.print(" },");
// CHECK CRC
if (ow.crc8(address, 7) == address[7])
{
Serial.println("\t\t// CRC OK");
}
else
{
Serial.println("\t\t// CRC FAILED");
}
} while (ow.search(address));
Serial.println("};");

View File

@ -23,9 +23,9 @@
"version": "^2.3.5"
}
],
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"frameworks": "arduino",
"frameworks": "*",
"platforms": "*",
"headers": "DS18B20_INT.h"
}

View File

@ -1,5 +1,5 @@
name=DS18B20_int
version=0.3.0
version=0.3.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library for DS18B20 restricted to a single sensor per pin.

View File

@ -1,7 +1,7 @@
//
// FILE: DS18B20_INT.cpp
// AUTHOR: Rob.Tillaart@gmail.com
// VERSION: 0.3.0
// VERSION: 0.3.1
// DATE: 2017-07-25
// PUPROSE: library for DS18B20 temperature sensor - integer only.
// URL: https://github.com/RobTillaart/DS18B20_INT

View File

@ -2,7 +2,7 @@
//
// FILE: DS18B20_INT.h
// AUTHOR: Rob.Tillaart@gmail.com
// VERSION: 0.3.0
// VERSION: 0.3.1
// DATE: 2017-07-25
// PUPROSE: Minimalistic library for DS18B20 temperature sensor
// uses only integer math (no float to minimize footprint)
@ -21,7 +21,7 @@
//
#define DS18B20_INT_LIB_VERSION (F("0.3.0"))
#define DS18B20_INT_LIB_VERSION (F("0.3.1"))
#include "Arduino.h"
#include "OneWire.h"