Quote Originally Posted by Demon View Post
P is defined as byte, but referred as bit?
It should be byte as it stores the width of the pulse (in uS) PULSIN receives.
Then it simply stores on itself the value of '1' or '0' according the width of this pulse.

Edit: what if you display the data you receive, pause a few seconds, then continue. Confirm you're getting data as you expect it.
Hmm! I will give it a try and let you knoiw ....Good thoughts my friend!

Edit 2: Does your array start at 0 or 1? (Haven't coded in a while).
I don't think is matter... Arrays start at 0.

Only 17 entries for temp, missing #17.
I just try to not capture the higher bit of temp (1 means temp is below 0 degrees Celsius) for the moment just testing....

Robert Thank you very much for replying

As I can see no example ANYWHERE in the net for DHT22 and picbasic , when completed it would be a good starting point for experiments with this low cost sensor!