Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By DanieSpreeth
#92783 Hey Guys,

What I'm trying here should not be hard - I must be missing something. Let me try to give as much info as possible without going overboard and get you all bored :D

I bought 3 of these sets - note they came with esp01S boards
dht22esp01kit.jpg


Then I also got this so I can get them programmed & running (included came an ESP-01)
esp01kit.jpg


Software is no problem for me - been a developer for 25yrs (but not an expert on any level when it comes to hardware) so I had the coding done long before the units even got delivered. Managed to get it uploaded to the esp-01s modules, but code never executed. After some research I changed the flash mode setting to dout and the code ran - wifi works as well as serial monitor. But when I connect the esp01s to the dht22 unit and power up, it refuses to read the values from the sensor. After a lot of testing I decided to try with the esp01 from the usb connecter "kit", and it worked perfectly - everything.

The only possibility I can think of is that i know the dht's data pin is on pin 2 of the esp. I also know that when I ran the blink test on the ESP01S modules I had to specify the built in led is on pin 2 - with the esp01 specifying that was not required to get the blink working. Could this be the reason - led & dht on pin 2? Somehow I doubt it - why would a kit be sold with the dht22 and esp01s which only works with the esp01?

Either way, I have no idea what to try nor where to search online for answers anymore - any and all help will be very much appreciated.
You do not have the required permissions to view the files attached to this post.
User avatar
By DanieSpreeth
#92806 Ok - while being completely flooded by responses on this question ( :roll_eyes: ) the following progress have been made:

After putting away my "fear" of changing hardware, I removed the connection on the circuit board of the DHT22 "shield" between GPIO2 of the ESP01S and reconnected it to GPIO1 (Tx). I did not opt for using GPIO0 as I think it will interfere with flash mode (could be wrong here, but I did try it and nothing worked). Using GPIO1 lead to some interesting and weird results. It now works, but VERY intermittently. The code is suppose to be "looping" every 5 minutes (simple delay statement delaying 5*60*1000 millisecs) but I keep on getting inconsistent readings. Below is the very simple text file recording every successful reading from the sensor.

05:33:32 PM -> A8:48:FA:CC:E8:4F,24.10,54.30
05:46:07 PM -> A8:48:FA:CC:E8:4F,27.10,47.30
08:34:09 PM -> A8:48:FA:CC:E8:4F,25.40,50.30
09:09:37 PM -> A8:48:FA:CC:E8:4F,31.20,40.80
09:57:29 PM -> A8:48:FA:CC:E8:4F,27.00,46.50

Just a simple timestamp, the mac address from the esp01s and finally the temperature and humidity readings from the DHT22 on that esp01s. When I look at the same log file for the esp01 (the one that always worked) it looks like this:

11:17:22 AM -> A4:CF:12:D0:08:C8,24.70,43.80
11:22:23 AM -> A4:CF:12:D0:08:C8,24.80,44.80
11:27:23 AM -> A4:CF:12:D0:08:C8,24.90,47.70
11:32:41 AM -> A4:CF:12:D0:08:C8,25.50,49.00
11:37:31 AM -> A4:CF:12:D0:08:C8,25.40,44.00

The little knowledge I have tells me the issue has to be the fact that I used GPIO1 - Tx - and somehow that interferes (sometimes) with the wifi not connecting or something.

Any ideas please?