Two Arduino problems fixed in one day! Halelujah!

 I've been procrastinating on two problems that I've not been able to resolve  - or google an answer for in my code.

 

1) Slow response in the Serial.parseInt() function... yes google gave me lots of people with the same problem, but I finally found a reference to  Serial.setTimeout()  ... well what do you know...  I set Serial.setTimeout(50)  in my setup... and low and behold...

  SNAP RESPONSE now!!!!   

 

2)  And worse... I have integrated an RHT03 one wire Temperature and Humidity sensor... roughly equivalent to the DHT22.  From day one, I've used a derivative of the nethoncho library (https://github.com/nethoncho/Arduino-DHT22)  from

https://github.com/ringerc/Arduino-DHT22

as it seemed to be the one most articles referenced...  Alas I've been plagued with CRC errors and sporadic temperature/humidity errors where I wrote contraints to ignore anything outside of "normal".

Today I was reading    http://apartmentarduino.blogspot.com/2012/01/step-three-interfacing-rht03.html

and   http://garagelab.com/profiles/blogs/tutorial-humidity-and-temperature-sensor-with-arduino

which point back to   http://playground.arduino.cc/Main/DHTLib ..... 

 

Now I had tried this one earlier... or so I had thought... but...

Desperate times call for desperate measures....  I remove all of my DHT22 code... replace it with the DHT library....

 

(horns and drums please!)

 

I'm now getting consistent readings !!!!  

 

Two down,  only about a hundred more to go....

 

 

Congrats

Thanks for sharing the information you have gleaned.