Git Product home page Git Product logo

iddhtlib's People

Contributors

dessimat0r avatar kcsoft avatar niesteszeck avatar per1234 avatar sensestage avatar spacepossum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

iddhtlib's Issues

Dewpoint calculation

Hi!

I need a source or reference where you have the formula of double idDHTLib::getDewPointSlow() from. According to the link in the comments the only function I consider to be relevant is FUNCTION DWPT(T,RH) but it looks way different to your approach. And the website of NOAA is like an information grave.I would be happy for any hint!

Problem while including the library in a sketch using the menu Sketch>Include Library>

Hello.

I just wanted to tell you that when I include the library in a sketch by navigating the IDE menu through Sketch>Include Library>idDHTLib, this is what gets written into the sketch:
#include <idDHTLib.h>
#include <idDHTLib_cb.h>
#include <max_interrupt.h>

which causes many many errors during compiling, I don't know how Arduino decides which .h files should be included with a library but the files #include idDHTLib_cb.h & max_interrupt.h should obviously not be included in the sketch. For completeness I'll include the error message generated when these files are included, this is the complete error message(sorry about the poor formatting, I have no clue about how I could post this in a nice way, if anyone knows please feel free to inform me), this is the end of this post, the rest is the error message:

Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users...\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users...\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users...\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10809 -build-path C:\Users...\AppData\Local\Temp\arduino_build_382971 -warnings=all -build-cache C:\Users...\AppData\Local\Temp\arduino_cache_546041 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users...\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users...\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users...\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10809 -build-path C:\Users...\AppData\Local\Temp\arduino_build_382971 -warnings=all -build-cache C:\Users...\AppData\Local\Temp\arduino_cache_546041 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino
Using board 'nano' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\...\AppData\Local\Temp\arduino_build_382971\sketch\NANO_DHT11_nonblocking_example.ino.cpp" -o nul
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\...\Documents\Arduino\libraries\idDHTLib-master-v1" "C:\Users\...\AppData\Local\Temp\arduino_build_382971\sketch\NANO_DHT11_nonblocking_example.ino.cpp" -o nul
Using cached library dependencies for file: C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1\idDHTLib.cpp
Generating function prototypes...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\...\Documents\Arduino\libraries\idDHTLib-master-v1" "C:\Users\...\AppData\Local\Temp\arduino_build_382971\sketch\NANO_DHT11_nonblocking_example.ino.cpp" -o "C:\Users\...\AppData\Local\Temp\arduino_build_382971\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\...\AppData\Local\Temp\arduino_build_382971\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\...\Documents\Arduino\libraries\idDHTLib-master-v1" "C:\Users\...\AppData\Local\Temp\arduino_build_382971\sketch\NANO_DHT11_nonblocking_example.ino.cpp" -o "C:\Users\...\AppData\Local\Temp\arduino_build_382971\sketch\NANO_DHT11_nonblocking_example.ino.cpp.o"
In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:2:0,

             from C:\Users\...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib.h:100,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:1:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:9:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT digitalPinToInterrupt(2)

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:2:0: note: this is the location of the previous definition

#define MAX_INTERRUPT -1

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:13:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT digitalPinToInterrupt(3)

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:9:0: note: this is the location of the previous definition

#define MAX_INTERRUPT digitalPinToInterrupt(2)

^

In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib.h:100:0,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:1:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:9:0: warning: "PFUNC_CALLBACKS" redefined

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:4:0: note: this is the location of the previous definition

#define PFUNC_CALLBACKS

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:14:0: warning: "PFUNC_CALLBACKS" redefined

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0, &idDHTLib::dhtCallback1

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:9:0: note: this is the location of the previous definition

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0

^

In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:2:0,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:2:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:2:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT -1

^

In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:2:0,

             from C:\Users\...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib.h:100,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:1:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:13:0: note: this is the location of the previous definition

#define MAX_INTERRUPT digitalPinToInterrupt(3)

^

In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:2:0,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:2:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:9:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT digitalPinToInterrupt(2)

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:2:0: note: this is the location of the previous definition

#define MAX_INTERRUPT -1

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:13:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT digitalPinToInterrupt(3)

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:9:0: note: this is the location of the previous definition

#define MAX_INTERRUPT digitalPinToInterrupt(2)

^

In file included from C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:2:0:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:4:0: warning: "PFUNC_CALLBACKS" redefined

#define PFUNC_CALLBACKS

^

In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib.h:100:0,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:1:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:14:0: note: this is the location of the previous definition

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0, &idDHTLib::dhtCallback1

^

In file included from C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:2:0:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:9:0: warning: "PFUNC_CALLBACKS" redefined

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:4:0: note: this is the location of the previous definition

#define PFUNC_CALLBACKS

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:14:0: warning: "PFUNC_CALLBACKS" redefined

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0, &idDHTLib::dhtCallback1

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:9:0: note: this is the location of the previous definition

#define PFUNC_CALLBACKS &idDHTLib::dhtCallback0

^

In file included from C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:3:0:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:2:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT -1

^

In file included from C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:2:0,

             from C:\Users\...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:2:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:13:0: note: this is the location of the previous definition

#define MAX_INTERRUPT digitalPinToInterrupt(3)

^

In file included from C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:3:0:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:9:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT digitalPinToInterrupt(2)

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:2:0: note: this is the location of the previous definition

#define MAX_INTERRUPT -1

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:13:0: warning: "MAX_INTERRUPT" redefined

#define MAX_INTERRUPT digitalPinToInterrupt(3)

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/max_interrupt.h:9:0: note: this is the location of the previous definition

#define MAX_INTERRUPT digitalPinToInterrupt(2)

^

In file included from C:\Users...\Documents\Arduino\NANO_DHT11_nonblocking_example\NANO_DHT11_nonblocking_example.ino:2:0:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h: In function 'void dhtCallback0()':

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:6:59: error: 'objectAtInt' was not declared in this scope

#define CREATE_CALLBACK(x) static void dhtCallback##x() { objectAtInt[x]->dhtCallback(); }

                                                       ^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:10:3: note: in expansion of macro 'CREATE_CALLBACK'

CREATE_CALLBACK(0);

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h: In function 'void dhtCallback1()':

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:6:59: error: 'objectAtInt' was not declared in this scope

#define CREATE_CALLBACK(x) static void dhtCallback##x() { objectAtInt[x]->dhtCallback(); }

                                                       ^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:15:3: note: in expansion of macro 'CREATE_CALLBACK'

CREATE_CALLBACK(1);

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h: At global scope:

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:6:40: warning: 'void dhtCallback0()' defined but not used [-Wunused-function]

#define CREATE_CALLBACK(x) static void dhtCallback##x() { objectAtInt[x]->dhtCallback(); }

                                    ^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:10:3: note: in expansion of macro 'CREATE_CALLBACK'

CREATE_CALLBACK(0);

^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:6:40: warning: 'void dhtCallback1()' defined but not used [-Wunused-function]

#define CREATE_CALLBACK(x) static void dhtCallback##x() { objectAtInt[x]->dhtCallback(); }

                                    ^

C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1/idDHTLib_cb.h:15:3: note: in expansion of macro 'CREATE_CALLBACK'

CREATE_CALLBACK(1);

^

Using library idDHTLib-master-v1 in folder: C:\Users...\Documents\Arduino\libraries\idDHTLib-master-v1 (legacy)
exit status 1
Error compiling for board Arduino Nano.

due sei() cli()

Arduino due has no sei(), cli(). plz change it to

noInterrupts(); delta = micros() - us; interrupts();

DHT11 code assumes no decimal part for Temp but is not correct

The code in the acquiring function ignores two of the 5 bytes returned by a DHT11 on the assumption neither temperature nor humidity results will have a decimal component. This is not correct for the DHT11 part I have (for Temperature anyway) and also contradicts the spec to be found here http://www.micropik.com/PDF/dht11.pdf. Maybe later models are better implementing the spec? Either way ignoring the decimal component in the Temp field creates an incorrect checksum error.

Not an error, but the sum field in the acquiring function is declared as an unsigned 8 bit field so the instruction to mask it using & 0xFF has no effect. Effectively this is just wasting processing cycles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.