# Dht-11 sensor issues

**URL:** https://forum.xod.io/t/dht-11-sensor-issues/5208
**Category:** Uncategorized
**Created:** [May 25, 2021, 1:36am UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208 "2021-05-25T01:36:19Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![projie](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/projie/32/3696_2.png) [@projie](https://forum.xod.io/u/projie)
#### Post date: [May 25, 2021, 1:36am UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/1 "2021-05-25T01:36:20Z")

</div>

elo xoders i have a small issue with this sensor , this might be rhetorical for some , i have dht-11 sensor node connected up to 16x2 lcd 2ic lcd , cant get it to read all i get is an error on the lcd , does the sensor need to be connected to a PWm out put ? , the lcd does work as i have other info displaying on  
lcd , how come the dht-11 sensor can measure temp and humidity , but only has one pin for feed back , tho the dht-11 node can out 😀put two readings to the lcd , temp and humidity , or is this a case of i have down load a dht-11 library to the arduino ide ?

---

<div class="post-metadata">

### Author: ![san43](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/san43/32/2904_2.png) [@san43](https://forum.xod.io/u/san43)
#### Post date: [May 25, 2021, 1:44pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/2 "2021-05-25T13:44:40Z")

</div>

It sounds like you might be using the dht11-device node rather than the dht11-hygrometer node? The dht11-hygrometer node combines the dht11-device node with other required nodes to give you temp and humidity readings.

There’s an example in the [library](https://xod.io/libs/xod-dev/dht/) called dht11-example - try running that first.

---

<div class="post-metadata">

### Author: ![projie](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/projie/32/3696_2.png) [@projie](https://forum.xod.io/u/projie)
#### Post date: [May 25, 2021, 11:21pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/3 "2021-05-25T23:21:34Z")

</div>

thank , you i tried the dht11-hygrometer node stil same result , found an earlyer blog on here , using a clock node to limit the amounts of reads , done that stil with the same result , what port is the correct port to use ?  
, i used port 7 , this is a normal i/o port cant see how this can give a linear reading from a variable sensor , im thinking it should be on an analog port , but if you look on the examples they connect it to a normal I/O port

---

<div class="post-metadata">

### Author: ![balogh](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@balogh](https://forum.xod.io/u/balogh)
#### Post date: [May 26, 2021, 5:46am UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/4 "2021-05-26T05:46:12Z")

</div>

Most probably, you are trying to read the sensor data too quickly. According to my experience, single reading per 2 - 3 seconds is the maximum. Otherwise the sensor returns ‘ERR’ reading.

---

<div class="post-metadata">

### Author: ![san43](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/san43/32/2904_2.png) [@san43](https://forum.xod.io/u/san43)
#### Post date: [May 27, 2021, 2:38pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/5 "2021-05-27T14:38:20Z")

</div>

I used D3 which is a PWM port - might help?

And yes - I did find continuous readings giving an error. I used a clock with 1sec timing and that worked for me.

---

<div class="post-metadata">

### Author: ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)
#### Post date: [May 27, 2021, 5:25pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/6 "2021-05-27T17:25:10Z")

</div>

PWM is for output, so shouldn’t make any difference if pin supports PWM if you are using it as an input pin.

---

<div class="post-metadata">

### Author: ![projie](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/projie/32/3696_2.png) [@projie](https://forum.xod.io/u/projie)
#### Post date: [May 27, 2021, 10:13pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/7 "2021-05-27T22:13:29Z")

</div>

thank you xoders — got it working , believe it or not , both sensors i had were faulty , went down to the local electronic store got new one worked first time , on another note were can i get a node for a 2IC temp and humidity sensor ?

---

<div class="post-metadata">

### Author: ![san43](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/san43/32/2904_2.png) [@san43](https://forum.xod.io/u/san43)
#### Post date: [June 3, 2021, 3:10pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/8 "2021-06-03T15:10:39Z")

</div>

[https://forum.xod.io/t/gy-bmp280-temperature-humidity-and-pressure-senzor/3220/4?u=san43](https://forum.xod.io/t/gy-bmp280-temperature-humidity-and-pressure-senzor/3220/4)

---

<div class="post-metadata">

### Author: ![projie](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/projie/32/3696_2.png) [@projie](https://forum.xod.io/u/projie)
#### Post date: [June 6, 2021, 9:34pm UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/9 "2021-06-06T21:34:19Z")

</div>

thank u san43 – got the note for the bmp280 , on the done it does not show an an i2c address , you recon add this in the C+ program of the node or change it ?

---

<div class="post-metadata">

### Author: ![san43](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/san43/32/2904_2.png) [@san43](https://forum.xod.io/u/san43)
#### Post date: [June 29, 2021, 8:43am UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/10 "2021-06-29T08:43:59Z")

</div>

I think the I2C address is defined in the Arduino library that this node is built around. If you go into the nodes’s code you’ll see that the first lines are:

// Tell XOD where it could download the library:  
#pragma XOD require “[GitHub - adafruit/Adafruit\_Sensor: Common sensor library](https://github.com/adafruit/Adafruit_Sensor)”  
#pragma XOD require “[GitHub - adafruit/Adafruit\_BMP280\_Library: Arduino Library for BMP280 sensors](https://github.com/adafruit/Adafruit_BMP280_Library)”

if you look at the .h file in the Adafruit library you will see that it defines the I2C address:

\*I2C ADDRESS/BITS/SETTINGS  
_/  
 #define BMP280\_ADDRESS (0x77) /_ \*\<The default I2C address for the sensor. _/  
 #define BMP280\_ADDRESS\_ALT   
(0x76) /_ \*\< Alternative I2C address for the sensor. \*/

You shouldn’t need to change the I2C address as its already set, but if you did want to I guess you’d have to change it in the original Arduino library, or redefine it in the C++ implementation in XOD.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)
#### Post date: [July 29, 2021, 8:44am UTC](https://forum.xod.io/t/dht-11-sensor-issues/5208/11 "2021-07-29T08:44:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
