GithubHelp home page GithubHelp logo

arduino-dht's People

Contributors

alext-mkrs avatar markruys avatar ozolive avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-dht's Issues

no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int, int)' LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3);

hi, so im working on an school project for my exam with an Arduino Uno, and ive got an lcd display and an DHT11 but im getting this error:

DHT-22:12:51: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int, int)'
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3);
^
In file included from C:\Users\merij\Downloads\DHT-22\DHT-22.ino:9:0:
C:\Users\merij\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C-1.1.2/LiquidCrystal_I2C.h:57:3: note: candidate: LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, uint8_t)
LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t lcd_rows);
^~~~~~~~~~~~~~~~~
C:\Users\merij\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C-1.1.2/LiquidCrystal_I2C.h:57:3: note: candidate expects 3 arguments, 9 provided
C:\Users\merij\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C-1.1.2/LiquidCrystal_I2C.h:55:7: note: candidate: constexpr LiquidCrystal_I2C::LiquidCrystal_I2C(const LiquidCrystal_I2C&)
class LiquidCrystal_I2C : public Print {
^~~~~~~~~~~~~~~~~
C:\Users\merij\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C-1.1.2/LiquidCrystal_I2C.h:55:7: note: candidate expects 1 argument, 9 provided
C:\Users\merij\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C-1.1.2/LiquidCrystal_I2C.h:55:7: note: candidate: constexpr LiquidCrystal_I2C::LiquidCrystal_I2C(LiquidCrystal_I2C&&)
C:\Users\merij\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C-1.1.2/LiquidCrystal_I2C.h:55:7: note: candidate expects 1 argument, 9 provided
DHT-22:13:1: error: 'dht' does not name a type
dht DHT;
^~~
C:\Users\merij\Downloads\DHT-22\DHT-22.ino: In function 'void loop()':
DHT-22:18:21: error: expected primary-expression before '.' token
int readData = DHT.read11(dataPin);
^
DHT-22:19:16: error: expected primary-expression before '.' token
float t = DHT.temperature;
^
DHT-22:20:16: error: expected primary-expression before '.' token
float h = DHT.humidity;
^
These are the Library's that i've got installed.
image

Naming Collision with well known DHT libraries

Generally it's good practice avoid naming your library the same way as other well known libraries, I'd suggest changing from the library name from DHT to something else to maximize compatibility. Some users of your library assumed compatibility with the adafruit DHT library, which could have been avoided.

DHT11 to LCD only displays q's but theres no Q in my code? (how do i fix it and make it work?)

hi, so i'm making an project for school, and I am trying to display the information of an DHT11 to an 16x2 LCD display (1602).

but its only displaying an Q although i dont have an q as lcd.print in my code.
`//hier importeren we de juiste librarys

#include <LiquidCrystal_I2C.h>

#include <Wire.h>

#include <DHT.h>

//hier laten we het programma weten wat het I2C adres

//is en dat het een 16 bij 2 beeldscherm is

LiquidCrystal_I2C lcd(0x27,20,4);

#define DHTPIN 7 // Digital pin connected to the DHT sensor
// Uncomment whatever type you're using!
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
DHT dht(DHTPIN, DHTTYPE);

#define DHT11_PIN 7

void setup(){

lcd.begin(16, 2);

//hier initializeren we de lampjes van

//het beeldscherm het is belangrijk dat je 2 keer

//lcd.init() hebt wantanders werkt je programma niet

lcd.on();

//lcd.on();

lcd.backlight();

}

void loop()

{

int chk = dht.read(DHT11_PIN);

lcd.setCursor(0,0);

lcd.print("Temp: ");

lcd.print(dht.readTemperature());

lcd.print("C");

lcd.setCursor(0,1);

lcd.print("Humi: %");

lcd.print(dht.readHumidity());

delay(2000);

}`
20211207_085444

image

It desn't work with ESP8266

When compiled for ESP8266, this library functions return some strange readings like:
Temperature: 3080214.00 *C
Humidity: 404527.00 %

Auto Detect (DHT11 vs DHT22) not reliable

See below - this is the output I get using the example sketch with a DHT22 connected.

Each blank line indicates when I've pressed the reset button on the Arduino.

NB I'm using a modified version of the example sketch that checks dht.getModel() after dht.setup() is called - see liwenyip@ff1c976

Auto-detected DHT11
Status	Humidity (%)	Temperature (C)	(F)
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8

Auto-detected DHT22
Status	Humidity (%)	Temperature (C)	(F)
OK	54.4		27.8		82.0
OK	54.2		27.8		82.0
OK	54.7		27.8		82.0

Auto-detected DHT11
Status	Humidity (%)	Temperature (C)	(F)
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8

Auto-detected DHT22
Status	Humidity (%)	Temperature (C)	(F)
OK	54.7		27.8		82.0
OK	54.5		27.8		82.0
OK	54.8		27.8		82.0
OK	54.7		27.8		82.0
OK	54.6		27.8		82.0

Auto-detected DHT22
Status	Humidity (%)	Temperature (C)	(F)
OK	54.7		27.8		82.0
OK	55.0		27.8		82.0

Auto-detected DHT22
Status	Humidity (%)	Temperature (C)	(F)
OK	55.0		27.8		82.0
OK	54.5		27.8		82.0

Auto-detected DHT22
Status	Humidity (%)	Temperature (C)	(F)
OK	54.9		27.8		82.0
OK	54.9		27.8		82.0
OK	54.8		27.8		82.0
OK	54.3		27.9		82.2

Auto-detected DHT11
Status	Humidity (%)	Temperature (C)	(F)
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8
OK	2.0		1.0		33.8

Auto-detected DHT22
Status	Humidity (%)	Temperature (C)	(F)
OK	54.3		27.9		82.2
OK	54.0		28.0		82.4
OK	53.9		28.0		82.4


Random numbers for temp and humidity

All,

used the example code and every once and a while the reported values go from normal to some low value

Normal = 24 C and 40%
Low Value = 0 C and 1%

Any idea why ?

Get respons if there is a failure

Sometimes the DHT22 doesnt work properly and doesnt give the right Temp. Is there a way to get a feedback whether the sensor is working properly or not?

Can I use with 2 DHT22s?

I have been using two DHT11s and the library that is specific to the DHT11 allows for specifying each sensor with a specific pin.

Can I do this with this new library using two DHT22s?
Thanks
Bruce

Unable to use library

When including the library as .zip file, an error occurs like Zip doesn't contain a library. I have been using your library everytime I use DHT11. Kindly solve the bug..

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.