0

DHT.h library issue on Linux (Debian 10 Buster)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DHT.h library issue on Linux (Debian 10 Buster)

by weinhouse on Fri Jan 08, 2021 6:22 am

Sorry if this is the wrong place to post and please let me know where to post.

Was getting error:
/home/larryw/sketchbook/libraries/DHT_sensor_library141/DHT.cpp:31:3: error: ‘UINT32_MAX’ was not declared in this scope
UINT32_MAX /**< Used programmatically for timeout.

With some internet searching I added a line in DHT.cpp file:
#define UINT32_MAX 65535

Is this line correct? seems to work now, is there something else that could be the issue?

OS - Debian 10 Buster
Arduino IDE 2:1.o.5+dfsg2-4.1

weinhouse
 
Posts: 3
Joined: Fri Jan 08, 2021 6:07 am

Re: DHT.h library issue on Linux (Debian 10 Buster)

by adafruit_support_mike on Fri Jan 08, 2021 11:23 pm

Strictly speaking, it should be:

Code: Select all | TOGGLE FULL SIZE
#define UINT32_MAX 0xffffffff
.. the maximum value you can store in a 32-bit unsigned integer.

Looking at the code though, the value is only used as a symbol indicating the microcontroller timed out waiting for a pulse to change. As long as the value you chose works, you should be okay.

adafruit_support_mike
 
Posts: 61876
Joined: Thu Feb 11, 2010 2:51 pm

Re: DHT.h library issue on Linux (Debian 10 Buster)

by weinhouse on Mon Jan 11, 2021 5:42 pm

Thanks!

weinhouse
 
Posts: 3
Joined: Fri Jan 08, 2021 6:07 am

Please be positive and constructive with your questions and comments.


cron