CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RHT-03

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rikotech8



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

RHT-03
PostPosted: Mon Mar 03, 2014 2:13 pm     Reply with quote

Does anyone have driver for this?
http://www.ebay.com/itm/Humidity-Temperature-Sensor-DHT22-RHT03-Arduino-PIC-/131125075330?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1e87a9dd82
_________________
A person who never made a mistake never tried anything new.
Ttelmah



Joined: 11 Mar 2010
Posts: 19451

View user's profile Send private message

PostPosted: Mon Mar 03, 2014 2:19 pm     Reply with quote

<http://www.ccsinfo.com/forum/viewtopic.php?t=51358&highlight=dht22>
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Mon Mar 03, 2014 2:37 pm     Reply with quote

rikotech8,

When people ask such drop-dead obvious questions that could have been answered with a simple forum search, a lot of folks relegate those people to the 'totally hopeless, waste-of-time' category.......

Just sayin'.......

John
rikotech8



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

PostPosted: Tue Mar 04, 2014 11:39 am     Reply with quote

First, searching RHT03 is different than searching THD right? I used the search into the forum for RTH-03 with no results "No topics or posts met your search criteria".
Since I read the code I wonder how this routine could return number bigger than 0x0F, four bits filled in only, whatever is the serial input? It suppose to return 8bit value.
Code:

 for(iIndex = 0; iIndex < 8 ; iIndex++)
   {
      bExit = False;
      set_timer0(0);
      while (!input(DHT_IO) && !bExit);
      delay_us(30);

      if (input(DHT_IO))
      {
         iValue = iValue |(1<<(7 - iIndex));
         bExit = False;
         set_timer0(0);
         while (input(DHT_IO) && !bExit);
      }
   }
  return iValue;   
}

iValue cant be more than dec.15. I need 8 bit value returned.
I dont know if some1 have tried it but for me it wont work. Maybe I mistake?
_________________
A person who never made a mistake never tried anything new.
Ttelmah



Joined: 11 Mar 2010
Posts: 19451

View user's profile Send private message

PostPosted: Tue Mar 04, 2014 11:47 am     Reply with quote

iIndex = 0; iIndex < 8

8 values. Where are you getting 4 from?.
rikotech8



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

PostPosted: Tue Mar 04, 2014 12:49 pm     Reply with quote

Sorry my mistake!
_________________
A person who never made a mistake never tried anything new.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group