Arduino Uno + ESP8266 + DHT11

So first of my ESP can connect to the wifi but can’t get information from the DHT. It always says:
Failed to read from DHT sensor!
I’m using the DHT11 + Arduino + esp example code. Just changed the baudrates to 115200 (because only on that baudrate the esp could connect to wifi?).
I crossed the TX and RX wires, don’t know if this is ok. But atleast my ESP can connect to my wifi.
Does someone have an idea of what I’m doing wrong?

Thanks for any advice in advance!

Regrettably that will not work. Uno, ESP and Blynk will not work together at 115200 so you must change the baud rate of the ESP.

Yes crossing tx and rx is ok but realise it might destroy the ESP if you don’t have a voltage divider on the ESP’s rx pin (Uno is kicking out 5V to the 3.3V ESP). Espressif Chairman states some ESP’s are 5V tolerant but a couple of resistors are only a few cents so probably not worth the risk.

Many users seems to wire up their sensors wrongly, worth checking.

1 Like

Well but when using 9600 as Baudrate it always says that it cant connect. And im pretty sure I wired my sensor correctly, OUT to 2 Pin just as in the example sketch, gnd to gnd and vcc to 5v.

That’s because you haven’t sent the correct AT command to the ESP. Many ESP’s come from the factory set at 115200 (some at the odd 74800) rate because they work well at this speed if you don’t try to hook them up to an Arduino.

Google will give you the AT command you require.

Okay I will try that. Thank you.

Check out the Blynk Help Center about the combined Arduino / ESP8266 setup

How are you going with this? I am using an uno + esp8266 at the moment. Took a bit to get it going but working good now.

Not good. I can neither change the baudrate via AT commands nor update the firmware, its just not working for me. I probably already blew up tx and rx through the 5v’s from arduino. I think I’m going back to bluetooth and dump that stupid esp thing, just too time consuming.

Do you have a usb to serial so you can program it or are you just using the uno?

I am using the uno. I can only use the 3,3V pin because I dont have an external power supply that also might be the problem.

I had not so good results that way. straight forward once i got the ftdi usb to serial.

Have you uploaded the bare minimum sketch first to ensure nothing is using the serial?
Have you tried to flash it using the esp flasher from using the arduino port?

and here is a couple of links i used to get most of it going. I have another one somewhere i will see if i can find it.
Connect to Blynk Using ESP8266 As Arduino Uno Wifi Shield (Mac Only)
Connecting ESP8266-01 to Arduino UNO/MEGA and BLYNK

Mine worked without it for testing and setup. I do have it on external one now and running the serial through a logic level shifter as i was using software serial once it was setup but switched over to the hard serial and ran at a higher baud rate.

Okay thank you, will definetly read through that links. But losing faith to get it going with the stuff I’m owning.

The hardest part was getting it to work the first time.

Can you still give it AT command or have you lost that function also?

Its not replying at all.

Best bet then would be to try and wire it up for flash mode and see if the flash tool can see it.

A post was split to a new topic: Help me how to combine the skectch about with LCD i2c and control led and dimmer

A post was split to a new topic: NodeMCU cannot connect to WiFi