tag:blogger.com,1999:blog-6100511197805579796.post3680917633108474922..comments2024-02-14T18:43:36.096+01:00Comments on Davide Gironi blog: Reading Temperature and Humidity on AVR Atmega using DHT11 or DHT22/AM2302 libraryDavide Gironihttp://www.blogger.com/profile/16366076989473118278noreply@blogger.comBlogger142125tag:blogger.com,1999:blog-6100511197805579796.post-15566883985282885482021-05-29T19:48:47.999+02:002021-05-29T19:48:47.999+02:00Hello ateeb, this library works with ATmega 16, it...Hello ateeb, this library works with ATmega 16, it's just a matter of setting ports in the right way.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-57559873772837110182021-05-28T18:26:52.325+02:002021-05-28T18:26:52.325+02:00Hello sir sir it's urgent
Can you help me to ...Hello sir sir it's urgent <br />Can you help me to interface dht11 with Atmel 16 with using dht lib respectively ateebhttps://www.blogger.com/profile/16995078791680816570noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-15807156709838136752021-01-09T10:25:43.727+01:002021-01-09T10:25:43.727+01:00Thank you for sharing your mod!Thank you for sharing your mod!Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-57027764309847031552021-01-08T21:37:00.780+01:002021-01-08T21:37:00.780+01:00Needed to fix the first HostLOWtime. > 1,1ms wo...Needed to fix the first HostLOWtime. > 1,1ms worked for me with Mega1284p and Dollatek DHT-22 AM2302. THX DUDEBeehttps://www.blogger.com/profile/05991420647183865008noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-27526722321927686702020-03-28T10:34:31.456+01:002020-03-28T10:34:31.456+01:00Dear Isaac, at first you should try to send some d...Dear Isaac, at first you should try to send some data over UART with a simple uart program, then you can use the UART line to connect this device.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-45451521727137124582020-03-27T19:33:53.334+01:002020-03-27T19:33:53.334+01:00Good day. Do i need to specify which uC i am using...Good day. Do i need to specify which uC i am using to use the uart headers?<br />When I program the 328p it does not transmit anything.Isaac Mezahttps://www.blogger.com/profile/01877542499541422297noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-43783345365568657102019-10-21T10:48:14.200+02:002019-10-21T10:48:14.200+02:00The compiler settings are different between projec...The compiler settings are different between project. For this kind of project you have to select C project.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-28796534349714636842019-10-21T06:23:59.692+02:002019-10-21T06:23:59.692+02:00Do you know what is the difference between creatin...Do you know what is the difference between creating a C and a C/C++ project?<br />I think it was the issue.<br />Now it let me compile creating a C project.betiitohttps://www.blogger.com/profile/13765367449699419540noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-307337500765718152019-10-21T05:52:58.541+02:002019-10-21T05:52:58.541+02:00Thanks dude, I will try again. Thank you for the q...Thanks dude, I will try again. Thank you for the quick response.betiitohttps://www.blogger.com/profile/13765367449699419540noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-62613347352909036102019-10-20T19:38:42.733+02:002019-10-20T19:38:42.733+02:00Shubash Mehra, can you share it with me please?
be...Shubash Mehra, can you share it with me please?<br />betitomota@gmail.combetiitohttps://www.blogger.com/profile/13765367449699419540noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-35886710698310258822019-10-20T11:48:20.300+02:002019-10-20T11:48:20.300+02:00Hello betiito, i think you are not linking and com...Hello betiito, i think you are not linking and compiling the dht.h library.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-69667521120701671282019-10-19T20:56:25.421+02:002019-10-19T20:56:25.421+02:00Hello Davide, do you know why I am getting this er...Hello Davide, do you know why I am getting this error:<br />Error undefined reference to `dht_gettemperaturehumidity(float*, float*)' GccApplication1 <br />betiitohttps://www.blogger.com/profile/13765367449699419540noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-43087452346807091522019-10-19T20:55:22.202+02:002019-10-19T20:55:22.202+02:00Hello Davide, do you know what is wrong? I am gett...Hello Davide, do you know what is wrong? I am getting this error:<br />Error undefined reference to `dht_gettemperaturehumidity(float*, float*)'betiitohttps://www.blogger.com/profile/13765367449699419540noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-8524770641177263392019-06-28T14:39:15.119+02:002019-06-28T14:39:15.119+02:00Hello, unluckly i do not use codivisionAVR, this c...Hello, unluckly i do not use codivisionAVR, this code was tested and compiled with avrgccDavide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-36916157914408418162019-03-11T08:07:29.598+01:002019-03-11T08:07:29.598+01:00This comment has been removed by the author.Constantinehttps://www.blogger.com/profile/13273747778798697064noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-85708652666852426692018-07-19T18:00:40.378+02:002018-07-19T18:00:40.378+02:00hi david, can ur code work in codevisionAvr? i'...hi david, can ur code work in codevisionAvr? i'm having a project with dht22/atmega16 and using CodevisionAvr. Tks u so muchAnonymoushttps://www.blogger.com/profile/12636434613438588992noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-64989101884424033692018-03-25T17:19:56.243+02:002018-03-25T17:19:56.243+02:00Hello, this library is not for Arduino, it's a...Hello, this library is not for Arduino, it's a plain avrgcc library. You have to compile it with avrgcc. Take a view on a avrgcc compile tutorial. You could also look at the avrfreaks forum, you will find a lot of usefull information there.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-19654532792398066172018-03-24T19:06:10.720+01:002018-03-24T19:06:10.720+01:00Hi David, Nice Works. I am beginner. My ATmega16L ...Hi David, Nice Works. I am beginner. My ATmega16L connected to DHT11 and LCD. My LCD always prints NaN as temp&humidity. Came here to try your library DHT11. But the given src folder has main.c and I am not sure how to initialize your library and read temp and humidity from void loop() and void setup() function. Since my file is .ino extension. As you already suggested I am not pasting my code here. Note: I have placed your lib in my arduino lib folder and imported using #include .<br /><br />Anonymoushttps://www.blogger.com/profile/01779350078066931823noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-33472352740457738552018-02-06T20:39:30.568+01:002018-02-06T20:39:30.568+01:00Hello, thank you for sharing your experience here....Hello, thank you for sharing your experience here. I've never go to production with a DHT11 or DHT22 project, so I've almost try 10 sensors, all of them worked. The Si7021 will be a good choice, you could also take a look to the AMT1001 that has a simple driver implemenatation. Happy coding :)Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-333781354248557952018-02-06T12:44:53.017+01:002018-02-06T12:44:53.017+01:00Hi, Davide!
I tried to use a logic analyzer to vie...Hi, Davide!<br />I tried to use a logic analyzer to view the data received from the DHT22 sensor. Everything is alright with them. Moreover, the checksum corresponds to reality.<br />The problem is obviously with the sensor itself, as many have already encountered a similar situation (for example, https://forum.arduino.cc/index.php?topic=240661.0).<br />When I try to breathe on the sensor, the humidity increases somewhere to 30-40%, but then gradually drops to 1%. I think that it's still a problem with this sensor.<br /><br />There are no problems with DHT11, although the humidity in the room is 20-30%, which is somehow still not enough, since another hygrometer (with another sensor) shows 40%.<br /><br />It is more likely that I will refuse to use DHT22 in the current project (I planned to install it from the outside), and DHT11 in subsequent projects in general, since in our Internet segment there are many people who complain about this sensor.<br />Alternatively, the sensors may be Si7021 (humidity and temperature) and BME280 (humidity, temperature, pressure). Their main advantage is a wide range of the values and the fact that they are calibrated from the factory. This is not advertising :)<br /><br />Thank you a lot, Davide!Anonymoushttps://www.blogger.com/profile/02643322527810699038noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-85418988343407230192018-01-28T16:42:29.322+01:002018-01-28T16:42:29.322+01:00Hello. If you did not set fuse, that's the wro...Hello. If you did not set fuse, that's the wrong part. You have to set the fuses according to the desired freq. Take a look here http://www.engbedded.com/fusecalc/ or on your micro datasheet to know how you have to set the fuse. You should just set the low fuse to change the freq. Keep in mind that you made wrong settings on fuse you may "brick" your ATmega, than you have to use something like "Atmega fusebit doctor" to unbrick it.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-79311806485421003992018-01-28T15:39:49.458+01:002018-01-28T15:39:49.458+01:00I compiled my code as you suggested with F_CPU 16M...I compiled my code as you suggested with F_CPU 16Mhz(part of code: #define F_CPU 16000000UL<br /> #include etc...) but it didn't work. Unfortunately i haven't scope so i can't try your test method. I didn't set anything at the fuse. I don't know if it should have been. What did i wrong?Thank you in advance for your reply<br /><br />Kerovitshttps://www.blogger.com/profile/07650589647620316776noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-59794879638440303132018-01-25T20:41:46.277+01:002018-01-25T20:41:46.277+01:00Hello, no problem at all, my english is maybe wors...Hello, no problem at all, my english is maybe worst than your. Check that your code is compiled with F_CPU 16Mhz and your ATmega fuse are properly setted up. A simple test may be to pull a pin up and down at a given frequency (in a simple manner event the _delay_ms function will fo the job), and look at that pin with a scope to check the frequency.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-69767916425240129512018-01-25T13:14:55.117+01:002018-01-25T13:14:55.117+01:00Hi David!
Please Help me!(sorry my bad english)
...Hi David!<br /><br />Please Help me!(sorry my bad english)<br /><br />I have an atmega128. I use your code on 1Mhz and it's working perfectly but when i try use on other Frequency like 16Mhz or 2Mhz it is not working.Kerovitshttps://www.blogger.com/profile/07650589647620316776noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-19840906382149646312018-01-12T11:15:50.802+01:002018-01-12T11:15:50.802+01:00The best thing is to test it against a new sensor....The best thing is to test it against a new sensor. You could try attach the sensor to let's say an Arduino board and check it using the Arduino lib.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.com