efthymios-ks / avr-dht Goto Github PK
View Code? Open in Web Editor NEWDHT11/DHT22 temperature and humidity sensor C library for AVR microcontrollers
License: MIT License
DHT11/DHT22 temperature and humidity sensor C library for AVR microcontrollers
License: MIT License
I had to tweak it a bit to compile:
DHT_Status
is not defined while DHT_Error_Humidity
and DHT_Error_Temperature
are not handled.
//Check status
switch (DHT_status())
{
case (DHT_Ok):
//Print temperature
//print(temp[0]);
//Print humidity
//print(hum[0]);
break;
case (DHT_Error_Checksum):
//Do something
break;
case (DHT_Error_Timeout):
//Do something else
break;
case (DHT_Error_Humidity):
//Do something else
break;
case (DHT_Error_Temperature):
//Do something else
break;
}
Hello,
after also using your LCD HD44780 library, I decided to also use your DHT22 one. I included all your libraries and now when I test it, it always shows timeout error when I print it. I have used your example .c code and I am using ATMega328p controller. Any help would be appreciated. I have also updated your program to the most recent comments (DHT_GetStatus on switch; _Delay_Read 20).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.