Dht-11 sensor issues

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 :grinning: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 ?

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 called dht11-example - try running that first.

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

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.

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.

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

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 ?

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

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 ?

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
#pragma XOD require “GitHub - adafruit/Adafruit_BMP280_Library: Arduino Library for BMP280 sensors

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.

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