Skip to content

Commit

Permalink
update readme.md (#14)
Browse files Browse the repository at this point in the history
- update readme.md
- create changelog.md
- minor edits
  • Loading branch information
RobTillaart authored Oct 25, 2023
1 parent 35fe148 commit de6578e
Show file tree
Hide file tree
Showing 7 changed files with 224 additions and 145 deletions.
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Change Log DHTlib

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.1.36] - 2023-10-25
- update readme.md
- create changelog.md
- minor edits


# [0.1.35] - 2021-12-16
- update library.json, license, #pragma once,
- move private defines to .cpp file

# [0.1.34] - 2021-11-13
- fix negative temperature DHT22 again (code from DHTNew)

# [0.1.33] - 2021-02-16
- fix #6 T-GO signal in handshake. (needed for long wires)

# [0.1.32] - 2021-02-01
- fix negative temperature DHT22 again (code from DHTNew)

# [0.1.31] - 2020-12-15
- fix negative temperature DHT22 (code from DHTNew)

# [0.1.30] - 2020-06-30
- own repo;

# [0.1.29] - 2018-09-02
- fix negative temperature DHT12 - issue #111

# [0.1.28] - 2018-04-03
- refactor

# [0.1.27] - 2018-03-26
- added _disableIRQ flag

# [0.1.26] - 2017-12-12
- explicit support for AM23XX series and DHT12

# [0.1.25] - 2017-09-20
- FIX https://github.com/RobTillaart/Arduino/issues/80

# [0.1.24] - 2017-07-27
- FIX https://github.com/RobTillaart/Arduino/issues/33 double -> float

# [0.1.23] - 2017-07-24
- FIX https://github.com/RobTillaart/Arduino/issues/31


----

## Older

// 0.1.22 undo delayMicroseconds() for wakeups larger than 8
// 0.1.21 replace delay with delayMicroseconds() + small fix
// 0.1.20 Reduce footprint by using uint8_t as error codes. (thanks to chaveiro)
// 0.1.19 masking error for DHT11 - FIXED (thanks Richard for noticing)
// 0.1.18 version 1.16/17 broke the DHT11 - FIXED
// 0.1.17 replaced micros() with adaptive loopcount
// removed DHTLIB_INVALID_VALUE
// added DHTLIB_ERROR_CONNECT
// added DHTLIB_ERROR_ACK_L DHTLIB_ERROR_ACK_H
// 0.1.16 masking unused bits (less errors); refactored bits[]
// 0.1.15 reduced # micros calls 2->1 in inner loop.
// 0.1.14 replace digital read with faster (~3x) code => more robust low MHz machines.
//
// 0.1.13 fix negative temperature
// 0.1.12 support DHT33 and DHT44 initial version
// 0.1.11 renamed DHTLIB_TIMEOUT
// 0.1.10 optimized faster WAKEUP + TIMEOUT
// 0.1.09 optimize size: timeout check + use of mask
// 0.1.08 added formula for timeout based upon clockspeed
// 0.1.07 added support for DHT21
// 0.1.06 minimize footprint (2012-12-27)
// 0.1.05 fixed negative temperature bug (thanks to Roseman)
// 0.1.04 improved readability of code using DHTLIB_OK in code
// 0.1.03 added error values for temp and humidity when read failed
// 0.1.02 added error codes
// 0.1.01 added support for Arduino 1.0, fixed typos (31/12/2011)
// 0.1.00 initial version by Rob Tillaart (01/04/2011)

96 changes: 66 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
[![Arduino CI](https://github.com/RobTillaart/DHTlib/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/DHTlib/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/DHTlib/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/DHTlib/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/DHTlib/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/DHTlib.svg)](https://github.com/RobTillaart/DHTlib/issues)

[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/DHTlib/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/DHTlib.svg?maxAge=3600)](https://github.com/RobTillaart/DHTlib/releases)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/DHTlib.svg)](https://registry.platformio.org/libraries/robtillaart/DHTlib)


# DHTlib
Expand Down Expand Up @@ -46,48 +49,81 @@ For latest version for the DHT, check https://github.com/RobTillaart/DHTNEW
| pin 4 | | GND |


## Interface

```cpp
#include "dht.h"
```


#### Constructor

- **dht()** Constructor


#### Read functions per type

- **int8_t read11(uint8_t pin)**
- **int8_t read(uint8_t pin)**
- **int8_t read12(uint8_t pin)**

- **inline int8_t read21(uint8_t pin)**
- **inline int8_t read22(uint8_t pin)**
- **inline int8_t read33(uint8_t pin)**
- **inline int8_t read44(uint8_t pin)**
- **inline int8_t read2301(uint8_t pin)**
- **inline int8_t read2302(uint8_t pin)**
- **inline int8_t read2303(uint8_t pin)**
- **inline int8_t read2320(uint8_t pin)**
- **inline int8_t read2322(uint8_t pin)**

- **float humidity** public class variable to access last read humidity.
- **float temperature** public class variable to access last read temperature.


#### Enable / disable interrupts

- **bool getDisableIRQ()**
- **void setDisableIRQ(bool b )**


## Operational

See examples


## Versions:

==> See DHTStable library for latest stable version for all platforms.

- version 0.1.13 is the last stable version for both AVR and ARM
- version 0.1.14 and up are not compatible any more with pre 1.0 Arduino.
These have breaking changes wrt ARM based Arduino's e.g DUE.
- version 0.1.15 is stable version for AVR only
- version 0.1.16 and 0.1.17 have breaking changes for DHT11
- version 0.1.18 works again for DHT11 (AVR only)
- version 0.1.19 fixed masking bug DHT11 (AVR only)
- version 0.1.20 Reduce footprint (34 bytes) by using int8_t as error codes. (thanks to chaveiro)
- version 0.1.21 replace delay with delayMicroseconds() + small fix (thanks to codingforfun)
- version 0.1.22 undo delayMicroseconds() for wakeups larger than 8
- version 0.1.23 fix https://github.com/RobTillaart/Arduino/issues/31
- version 0.1.24 fix https://github.com/RobTillaart/Arduino/issues/33
- version 0.1.25 fix https://github.com/RobTillaart/Arduino/issues/80
- version 0.1.26 Explicit support for AM23XX series and DHT12
- version 0.1.27 added \_disableIRQ flag
- version 0.1.28 refactor
- version 0.1.29 fix negative temperature DHT12 - issue #111
- version 0.1.30 own repo version
- version 0.1.31 fix negative temperature DHT22 (code from DHTNew)
- version 0.1.32 fix negative temperature DHT22 again (code from DHTNew)
- version 0.1.33 fix #6 T-GO signal in handshake. (needed for long wires)
- version 0.1.34 fix negative temperature DHT22 again (code from DHTNew)
- version 0.1.35 update license, library.json, #pragma once, minor edits
## Versions

- See changelog.md
- See DHTNEW or DHTStable library for latest stable version for all platforms.


## Future

- updates only on request basis (bugs)
#### Must

- improve documentation

#### Should

- separate history versions CHANGELOG.md file ?

#### Could

- improve unit tests
- constants
- move non public part of #defines to .cpp
- separate history versions releasenotes file ?
-

#### Wont

- updates only on request basis (bugs)


## 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,

Loading

0 comments on commit de6578e

Please sign in to comment.