Skip to content

Commit

Permalink
update library.json, license, minor edits (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart authored Dec 16, 2021
1 parent c3cc058 commit 9ec4d8f
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 55 deletions.
9 changes: 5 additions & 4 deletions DHTStable.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
//
// FILE: DHTStable.cpp
// AUTHOR: Rob Tillaart
// VERSION: 1.1.0
// VERSION: 1.1.1
// PURPOSE: DHT Temperature & Humidity Sensor library for Arduino
// URL: https://github.com/RobTillaart/DHTstable
//
// HISTORY:

// 1.1.0 2021-11-06 fix DHTNew-#67 negative temperature
// 1.1.1 2021-12-16 update library.json, license, minor edits
// 1.1.0 2021-11-06 fix DHTNew-#67 negative temperature
// 1.0.1 2021-06-01 change architecture to fix incompatible flag.
// 1.0.0 2021-05-26 rename files and class to DHTStable to fix incompatible flag.
// changed temperature and humidity to private
// breaking change!

// 0.2.9 2021-02-27 fix URL in library.json
// 0.2.8 2021-02-01 fix negative temperature (from DHTStablenew)
// 0.2.7 2020-12-20 add arduino-CI, unit test,
// 0.2.7 2020-12-20 add Arduino-CI, unit test,
// reset(), getTemperature(), getHumidity()
// 0.2.6 2020-07-20 update URL in .cpp
// 0.2.5 2020-06-30 move to own repository; update headers mainly.
Expand All @@ -30,7 +31,7 @@
// 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.08 added formula for timeout based upon clock speed
// 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)
Expand Down
13 changes: 5 additions & 8 deletions DHTStable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
//
// FILE: DHTStable.h
// AUTHOR: Rob Tillaart
// VERSION: 1.1.0
// VERSION: 1.1.1
// PURPOSE: DHT Temperature & Humidity Sensor library for Arduino
// URL: https://github.com/RobTillaart/DHTstable
//
// HISTORY:
// see dht.cpp file
//



#include "Arduino.h"

#define DHTSTABLE_LIB_VERSION (F("1.1.0 - DHTStable"))
#define DHTSTABLE_LIB_VERSION (F("1.1.1 - DHTStable"))


const int DHTLIB_OK = 0;
Expand Down Expand Up @@ -61,8 +58,8 @@ class DHTStable
float getHumidity() { return _humidity; };
float getTemperature() { return _temperature; };

bool getDisableIRQ() { return _disableIRQ; };
void setDisableIRQ(bool b ) { _disableIRQ = b; };
bool getDisableIRQ() { return _disableIRQ; };
void setDisableIRQ(bool b ) { _disableIRQ = b; };

private:
uint8_t _bits[5]; // buffer to receive data
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2014-2021 Rob Tillaart
Copyright (c) 2014-2022 Rob Tillaart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The DHTStable library is a "frozen" version of the DHTlib.
This version is stable for both ARM and AVR.

0.2.5 is a migration to its own repository.
0.2.6 fixed URL to new repro
0.2.6 fixed URL to new repository
0.2.7 getTemperature() and getHumidity() added
added arduino-ci + unit test.
added Arduino-CI + unit test.
0.2.8 fix negative temperature
0.2.9 fix URL in JSON file

Expand All @@ -44,5 +44,12 @@ See examples.

## Future

- follow bug fixes from DHTnew?
-
- no active development
- follow bug fixes from DHTnew
- on request.
- move some const int to .cpp file
- improve unit test
- add constants test
- add release_notes


11 changes: 3 additions & 8 deletions examples/dht11_test/dht11_test.ino
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
//
// FILE: dht11_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 1.0.0
// PURPOSE: DHT library test sketch for DHT11 && Arduino
// URL: https://github.com/RobTillaart/DHTstable
//
// HISTORY:
// 1.0.0 2021-05-26 class name changed to DHTStable (breaking change)
//
// 0.2.0 use getHumidity() and getTemperature()
// 0.1.2 add URL in header



#include "DHTStable.h"

DHTStable DHT;

#define DHT11_PIN 5
#define DHT11_PIN 5


void setup()
Expand Down Expand Up @@ -58,4 +52,5 @@ void loop()
delay(2000);
}


// -- END OF FILE --
14 changes: 5 additions & 9 deletions examples/dht12_test/dht12_test.ino
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
//
// FILE: dht12_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 1.0.0
// PURPOSE: DHT library test sketch for DHT12 && Arduino
// URL: https://github.com/RobTillaart/DHTstable
//
// HISTORY:
// 1.0.0 2021-05-26 class name changed to DHTStable (breaking change)
//
// 0.2.0 use getHumidity() and getTemperature()
// 0.1.1 add URL in header



#include "DHTStable.h"

DHTStable DHT;

#define DHT12_PIN 5
#define DHT12_PIN 5


void setup()
Expand Down Expand Up @@ -57,4 +51,6 @@ void loop()
delay(2000);
}

// END OF FILE

// -- END OF FILE --

18 changes: 5 additions & 13 deletions examples/dht22_test/dht22_test.ino
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
//
// FILE: dht22_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 1.0.0
// PURPOSE: DHT library test sketch for DHT22 && Arduino
// URL: https://github.com/RobTillaart/DHTstable
//
// HISTORY:
// 1.0.0 2021-05-26 class name changed to DHTStable (breaking change)
//
// 0.2.0 use getHumidity() and getTemperature()
// 0.1.4 add URL in header
// 0.1.03 extended stats for all errors
// 0.1.02 added counters for error-regression testing.
// 0.1.01 ?
// 0.1.00 initial version
//


#include "DHTStable.h"

DHTStable DHT;

#define DHT22_PIN 5
#define DHT22_PIN 5


struct
Expand All @@ -36,6 +24,7 @@ struct
uint32_t unknown;
} counter = { 0,0,0,0,0,0,0,0};


void setup()
{
Serial.begin(115200);
Expand All @@ -46,6 +35,7 @@ void setup()
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)\tTime (us)");
}


void loop()
{
// READ DATA
Expand Down Expand Up @@ -108,4 +98,6 @@ void loop()
delay(2000);
}


// -- END OF FILE --

14 changes: 9 additions & 5 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Syntax Coloring Map For DHTStable
# Syntax Colouring Map For DHTStable

# Datatypes (KEYWORD1)
# Data types (KEYWORD1)
DHTStable KEYWORD1


Expand All @@ -13,20 +13,24 @@ read21 KEYWORD2
read22 KEYWORD2
read33 KEYWORD2
read44 KEYWORD2

read2301 KEYWORD2
read2302 KEYWORD2
read2320 KEYWORD2
read2322 KEYWORD2

getHumidity KEYWORD2
getTemperature KEYWORD2

### obsolete in future
humidity KEYWORD2
temperature KEYWORD2

# Instances (KEYWORD2)


# Constants (LITERAL1)
DHTSTABLE_LIB_VERSION LITERAL1

DHTLIB_OK LITERAL1
DHTLIB_ERROR_CHECKSUM LITERAL1
DHTLIB_ERROR_TIMEOUT LITERAL1
DHTLIB_INVALID_VALUE LITERAL1

2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/DHTstable.git"
},
"version": "1.1.0",
"version": "1.1.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=DHTStable
version=1.1.0
version=1.1.1
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Stable version of library for DHT Temperature & Humidity Sensor
Expand Down
2 changes: 1 addition & 1 deletion test/unit_test_001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

unittest_setup()
{
fprintf(stderr, "DHTSTABLE_LIB_VERSION %s\n", (char *) DHTSTABLE_LIB_VERSION);
}

unittest_teardown()
Expand All @@ -38,7 +39,6 @@ unittest(test_constructor)
{
DHTStable dht;

fprintf(stderr, "%s\n", DHTSTABLE_LIB_VERSION);
assertFalse(dht.getDisableIRQ());

dht.setDisableIRQ(true);
Expand Down

0 comments on commit 9ec4d8f

Please sign in to comment.