Using DHT11 + HC-SR04 Ultrasonic sensor and ESP8266 as Wifi


Hi @barbaramartins143

According to @kreggly, the libraries work with versions 1.0 and up.


Si. Bueno. Gracias.

Yeah, works super good.


@wmontg5988 Thanks, maybe that’s the problem. I’m using version 0.4.
I’m gonna change the firmware version,and I’ll tell if that worked! :slight_smile:


I was lucky then, by buying an ESP8266 module already with a new version of
firmware… Thank you too.


Hi @kreggly, thanks for the informations.
I have another problem, I just found out that:
Ai-Thinker firmware version 1.0 and above requires at least 1MB (8Mbit) of Flash.
512kB (4Mbit) of Flash has to use older version (v0.9.5.2 – refer to alternative link below). I found that on here:

My ESP has 4Mbit of Flash, so It is saying that firmaware 1.0 and above won´t work well on my device. Maybe that is why I could not make this work till now. Do you know if there is something that I can do? I really need to connect my arduino with Cayenne through the ESP .


Most of us use ESP-12s, which run 4M of flash, and everything works just fine.

What specific ESP do you have?




I have ESP-01.


Strange, according to my purchase of this ESP module it is also 01 version… but I am not sure if the firmware installed is really 01, by the picture on the beginning of my post is it possible to say what version is this?


The ESP-01 may not work with SDK 1.3, but it is probably OK anyway. Note that when programming the Uno, you must have the TX line from the ESP disconnected. This is because the Uno serial port is used to program the Uno and both the ESP and your computer are trying to drive the RX line on the Uno.

Check this out for further reference.




Yes, thats what I have done, everytime I was making an upload the RX and TX
are disconnected always, my project just worked fine.


Do you have RX going to TX and TX going to RX when you reconnected the ESP?


Yes it’s also displayed on the electrical diagram on the top of this topic.



The drawing was hidden for me. Had to dig.

Ok, all I can think of is that you’re not getting the OK back, so maybe you need to connect GP0 to 3V3.

Otherwise, get a 3V3 serial cable and try to communicate to the ESP directly at different baud rates.




Hello Craig my project just worked fine… But thanks :slight_smile:


Finally it worked fine for me!
The problem was the firmware. Thanks!


hi @cassio.lucass, could you help me with this problem:
I downloaded the file CayenneESP8266Shield.log and I changed it to .h but I still have problems compiling, am I missing any steps? .I am trying with this simple code to find my error

Note: I already installed the library for the ESP8266 WIFI.

REGARDS :slight_smile:


Hello Ricardo,

Instead of changing directly to .h change it first to .zip and then extract
it to the cayenne library folder. Let me know if it helps.


Hello again, now compile me, I added this to my sketch include ESP8266_HardSer.h

COMPILED !!! :smile:

I will continue to advance, I want to connect a temperature sensor to cayenne with arduino + ESP8266. thanks greetings


I am glad you got it, ok let me know if you need help.


Hello! @cassio.lucass Could you explain how is the procedure to connect the ESP8266 to cayenne?, should i choose arduino or cayenneApi? And then what should I do?

regards! :smiley: