Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : WebMite Demo Problems
Author | Message | ||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
I just got a Pico-W in the mail and I figured I would load up the WebMite firmware and put the Humidity and Temperature web page code on it. I got the web page to show on my browser but I'm getting 1000 for both Humidity and the Temperature. And the documentation says that is what I will get if I don't have a DHT22 sensor connected. I'm just curious. Looking at the demo code it seems like the bit banging should be down on GP28 to match the circuit shown on the demo page. Of course I tried that, but I'm still getting a temperature of 1000. Does anybody have any ideas what I should check? I'm wondering if I got sent a DHT-11 by accident? Does anybody know if the initialization and command set are the same for the two parts? WEB TCP INTERRUPT WebInterrupt DO BITBANG HUMID GP15, CurrentTemp, CurrentHumid PAUSE 1000 LOOP SUB WebInterrupt LOCAL INTEGER a, p, t, b(4096/8) FOR a = 1 To MM.INFO(MAX CONNECTIONS) WEB TCP READ a, b() p = LINSTR(b(), "GET") t = LINSTR(b(), "HTTP") If (p > 0) And (t > p) Then WEB TRANSMIT PAGE a, "index.html" ENDIF NEXT a END SUB Edited 2024-05-24 10:19 by EDNEDN |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Try increasing the pause to 2000. DHT sensors won't wake up if the pause is too short. If this is on a breadboard check continuity from the Pico pins to all the DHT pins. Verify that you have 3.3V at the DHT pins. You may also need a pullup resistor, 3.3kΩ to 10kΩ. See "Measuring Humidity and Temperature" in the manual. A DHT22 command line test using whatever pin you have it connected to:- Do :Device Humid GP28, t, h :? t, h :pause 2000 :loop And for a DHT11:- Do :Device Humid GP28, t, h, 1 :? t, h :pause 2000 :loop |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
Increasing the Pause to 2000 or 2500 doesn't help. The connections have the pins of the Dupont wire soldered into the Pico-W. The other side of the Dupont wires are female and go to the circuit board the Alleged DHT-22 is on. I'll do the pull up next and see if that helps... PS. I messed around a little with: Do :Device Humid GP28, t, h :? t, h :pause 2000 :loop The syntax is off. I don't know what you intended. I'm going to try that in a program instead of in immediate mode. Edited 2024-05-24 12:45 by EDNEDN |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
What firmware version are you running? In later versions, BITBANG has been changed to DEVICE DEVICE HUMID is the same as BITBANG HUMID If you think it might be a DHT11, se the manual for command syntax Using a pullup is strongly recommended. VK7JH MMedit MMBasic Help |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
For a DHT11 with PicoMite MMBasic Version 5.09.00RC3 this is the output when the command line test is pasted into TeraTerm > Do :Device Humid GP28, t, h, 1 :? t, h :pause 2000 :loop 13 57 13 47 13 58 13 58 13 58 EDIT If the DHT is on a module it will probably have a 10kΩ pullup. Data pin = S Ground = - 3.3v = middle . Edited 2024-05-24 14:36 by phil99 |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
doesn't really contribute to help solve your problem but I have to say you are on a hiding to nothing with these ghastly devices. Long term they really suffer with humidity mis-reading and getting them to talk is a chore. I long ago washed my hands of DHT11/22s in favour of the HTU21 (I think there are updates too - it has been some time) for precisely the pain you are experiencing now. HTU21 is i2c and so much easier to talk to - I got it first time with some code published here (by, I think TassyJim or maybe PalCal?). If you are not too committed... Edited 2024-05-24 19:24 by CaptainBoing |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
> print mm.ver 5.0707 Thank you for the information about the name change for the command. That clears up a lot of the confusion I had. I'm still at the BitBang nomenclature. Score! Changing the GP15 to GP28 and adding the ",1" to the end of the line made it work. Even though I specifically ordered a DHT-22 they decided to send me a DHT-11. Oh Well... I got the demo working!!!! Understood! It looks like they have two surface mount resistors on the back side of the board. So that is probably OK now that the web page returns meaningful values. Thanks Jim!!! Edited 2024-05-25 00:24 by EDNEDN |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
Thanks... I can now duplicate your suggestion. |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
Sadly, the DHT11's are so much worse than a DHT22 that they are not much better than you using your OWN senses to figure current Humidity and Temperature. Honest, a guess is about as reliably accurate as the DHT11 sensor. Nice to see you got it to function though. I agree with using a different sensor, like the HTU21. I use them now myself. Edited 2024-05-25 01:02 by pwillard |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
Yes. I understand. I just wanted some working demo code. I've re-ordered several more DHT-22's off of eBay. So I'll be able to ditch the DHT-11's soon. |
||||
Print this page |