Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : HDT11 error

Posted: 10:55am
31 Jul 2025
Copy link to clipboard
grroel.tech
Newbie

I updated a Pico 2W with the latest version of WebMite. Now, when I run the HUMID command (DEVICE HUMID GP28 temp, humidity, DHT11), it returns 1000 and 1000 for temperature and humidity. The connections and pin assignments are the same as before. Just in case the DHT11 was broken, I tried other units, and the error persists. With the previous version of WebMite, it gave correct values. Any clues?
 
Posted: 11:07am
31 Jul 2025
Copy link to clipboard
phil99
Guru


The manual currently says HUMID pin, tvar, hvar [,DHT11]
But in the past it was HUMID pin, tvar, hvar [,1]
So for the DHT11 it was HUMID pin, tvar, hvar, 1 so that may be worth a try.

Edit.
Yes that works, so the new manual has a typo.
> HUMID gp2,tvar,hvar,1 :? tvar,hvar
10.1    88
>

Edited 2025-07-31 21:25 by phil99
 
Posted: 11:21am
31 Jul 2025
Copy link to clipboard
Supertech
Regular Member


A stab in dark suggestion. Some DT11 requies extra parameters been missed in manuals entirely?

Although I havent got a pico W2 running  yet I have DHT11 on pico W months now perfect via V6.00.01

But mine has never worked on anything until i found in the help viewer of fantastic mmedit of Tassy Jim! Go TJ!

So his info is exceptional!
Bitbang humid gpxx, tempvar, humidvar ,?

Set ? To 1 for DHT11 and 0 DHT22 simples.

Additional, the humidity in the DHT11 is genrally usless while its temperature is poor reslution, but it does work! See how you go....

Highly recomend mmedit. As a long term pic programmer, it's excellent. Google micromite, geoff website where mmedit lives.    
Regards.
 
Posted: 11:24am
31 Jul 2025
Copy link to clipboard
grroel.tech
Newbie



None of the ways work.
 
Posted: 11:27am
31 Jul 2025
Copy link to clipboard
Supertech
Regular Member


It may also be a pullup resistor issue or not a 5v compatibility pin compliant device. I'll let you reasurch that.
 
Posted: 11:27am
31 Jul 2025
Copy link to clipboard
phil99
Guru


See my post above Supertech

Edit.
Yes that works, so the new manual has a typo.
> HUMID gp2,tvar,hvar,1 :? tvar,hvar
10.1    88
>

Edited 2025-07-31 21:28 by phil99
 
Posted: 11:31am
31 Jul 2025
Copy link to clipboard
grroel.tech
Newbie

Eureka !!,

BITBANG HUMID GP2, temp, humidity, 1  

works !! The key is the value “1” instead of DHT11. Also work with DEVICE or HUMID alone.

Thanks Supertech
 
Posted: 11:34am
31 Jul 2025
Copy link to clipboard
Supertech
Regular Member


You cant use "temp" as variable, its a reserved command.

Dim mytemp!, myhumid!

BITBANG HUMID GP2, mtemp!, myhumid!, 1

Print mytemp!, myhumid!

Try that?
 
Posted: 11:42am
31 Jul 2025
Copy link to clipboard
Supertech
Regular Member


Yep, until that ? Extra 1 was added to earlier firmwares then forgotten to be included in later manuals, it never worked for me on ANY chip!

I still honor Tassy Jim as only he's got it in his editor help in infinate details.

Found at bottom of this page is his mmedit editor, well worth playing with.
https://geoffg.net/picomite.html

Try not to overheat now in your humidity    
 
Posted: 11:42am
31 Jul 2025
Copy link to clipboard
matherp
Guru

From the current manual (I just wanted to be sure it was correct)

  Quote  The optional DHT11 parameter modifies the timings to work with the DHT11.
Set to 1 for DHT11 and 0 or omit for DHT22.


DHT11 is treated as a variable set to zero. Use OPTION EXPLICIT and this sort of problem will never occur!
 
Posted: 12:03pm
31 Jul 2025
Copy link to clipboard
grroel.tech
Newbie

Sorry for my mistake, I didn't realize that DHT11 is a value, 0 or 1, and not a parameter.
I'm careless.
Thanks, matherp.
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025