mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
Solved issue #94 - changed #defines in const int to enforce datatype.
This commit is contained in:
parent
ec11173d97
commit
b8c55ed072
@ -1,11 +1,13 @@
|
||||
//
|
||||
// FILE: dht.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.2
|
||||
// VERSION: 0.2.3
|
||||
// PURPOSE: DHT Temperature & Humidity Sensor library for Arduino
|
||||
// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTstable
|
||||
//
|
||||
// HISTORY:
|
||||
// 0.2.3 2018-02-21 change #defines in const int to enforce return types.
|
||||
// https://github.com/RobTillaart/Arduino/issues/94
|
||||
// 0.2.2 2017-12-12 add support for AM23XX types more explicitly
|
||||
// 0.2.1 2017-09-20 fix https://github.com/RobTillaart/Arduino/issues/80
|
||||
// 0.2.0 2017-07-24 fix https://github.com/RobTillaart/Arduino/issues/31 + 33
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: dht.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.2
|
||||
// VERSION: 0.2.3
|
||||
// PURPOSE: DHT Temperature & Humidity Sensor library for Arduino
|
||||
// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTstable
|
||||
//
|
||||
@ -18,22 +18,22 @@
|
||||
#include <Arduino.h>
|
||||
#endif
|
||||
|
||||
#define DHT_LIB_VERSION "0.2.2 - dhtstable"
|
||||
#define DHT_LIB_VERSION "0.2.3 - dhtstable"
|
||||
|
||||
#define DHTLIB_OK 0
|
||||
#define DHTLIB_ERROR_CHECKSUM -1
|
||||
#define DHTLIB_ERROR_TIMEOUT -2
|
||||
#define DHTLIB_INVALID_VALUE -999
|
||||
const int DHTLIB_OK = 0;
|
||||
const int DHTLIB_ERROR_CHECKSUM = -1;
|
||||
const int DHTLIB_ERROR_TIMEOUT = -2;
|
||||
const int DHTLIB_INVALID_VALUE = -999;
|
||||
|
||||
#define DHTLIB_DHT11_WAKEUP 18
|
||||
#define DHTLIB_DHT_WAKEUP 1
|
||||
const int DHTLIB_DHT11_WAKEUP = 18;
|
||||
const int DHTLIB_DHT_WAKEUP = 1;
|
||||
|
||||
// max timeout is 100usec.
|
||||
// For a 16Mhz proc that is max 1600 clock cycles
|
||||
// loops using TIMEOUT use at least 4 clock cycli
|
||||
// so 100 us takes max 400 loops
|
||||
// so by dividing F_CPU by 40000 we "fail" as fast as possible
|
||||
#define DHTLIB_TIMEOUT (F_CPU/40000)
|
||||
const int DHTLIB_TIMEOUT = (F_CPU/40000);
|
||||
|
||||
class dht
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/Arduino.git"
|
||||
},
|
||||
"version":"0.2.2",
|
||||
"version":"0.2.3",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "atmelavr",
|
||||
"export": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=DHTStable
|
||||
version=0.2.2
|
||||
version=0.2.3
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Stable version of library for DHT Temperature & Humidity Sensor
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
This is the 0.2.2 version of the DHTlib.
|
||||
This is the 0.2.3 version of the DHTlib.
|
||||
This version is stable for both ARM and AVR.
|
||||
|
||||
You can use most examples from https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib/examples
|
||||
|
Loading…
Reference in New Issue
Block a user