WifiShield with arduino uno compiling error

Thanks for the reply, just missed it :slight_smile:

Mainly three:

  1. I’m creating a water supply system, but the water flow I’m managing should be started/stopped (and monitored meanwhile) in maximum 5/7 seconds
  2. I will increase my system to a domotic one, and I want everything to be perfectly working on a centralyzed system like Cayenne - many other applications on different systems I have are real time controlled, I don’t want to regress
  3. It perfectly works on MCU, so if I can, I do :slight_smile: :nerd_face:

As an update, I bought a MEGA, and used a logic level converter to connect esp, but… exact same behaviour. This drives me to think on a library or server issue…

Your opinion?


Ps in the former code I missed the if condition on millis(), but even updating it, same behaviour. It starts to be stable after setting data refresh to 20 seconds

1 Like

I’m having the same problem just getting the same Serial Monitor output without Cayenne seeing the UNO after successfully downloading suppaman78’s code in the post below of 1 Dec 2017.

Has anyone ever been able to follow up on finding a flashing program and more specifically the required .BIN file to overcome? Let’s keen this subject alive…

Specifically how did you change your code to include the ‘on millis()’ Thanks

Following up on my previous post of today, I’ve now followed the procedure in the following link and reflashed several ESP8266-01 which result in AT Version: of July 16 2016 and SDK Version: 2.0.0.

In addition I’ve confirmed that I’ve correctly downloaded / installed libraries is suggested above being:
CayenneESP8266Shield and ESP8266HardwareSerial

Unfortunately the problem remains having Cayenne recognize the UNO via the ESP8266-01.
Any further help or successful examples are appreciated.

What are you getting in the serial monitor?

Here you go, just add after Cayenne.loop() :

void loop() {

//Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.
if (millis() - lastMillis > 1000) {
lastMillis = millis();


Overall, be sure to use CayenneMQTTESP8266Shield library, Cayenne is switching everything on MQTT.

I now moved my installation on the MCU since I couldn’t solve the low refresh rate bug, but at least knowing that someone has a MQTT Arduino UNO/MEGA setup refreshing every second would confirm me that I should work on my hardware setup…

I eventually tracked the cause of Cayenne not recognizing the UNO through the ESP01 as being caused by poor connections from the ESP through a pin adapter and into a protoboard upon which most connections are made.

A couple of points that may help others are:
** The UNO 3.3V supply was sufficient although I tried a external 3.3V supply. External higher capacity 3.3V supply would still be recommended for a permanent installation.
** Although it is not clear on the various Youtubes etc the UNO Tx should always be connected to the ESP Tx through a voltage divider. The ESP Rx output being a lower voltage can connect direct to the UNO Rx as is the situation when you use the AT commands. Young players like me might have considered that Tx should connect to Rx in both directions but this is not correct.
** an excellent explanation of how to connect UNO to Cayenne through ESP is available at: How To Connect Arduino + ESP8266 To Cayenne - YouTube follow it carefully especially in my case when I used AT+CWJAP=“router-name”,“password” where I discover I was not connecting and getting a response of ‘WiFi Connected’ followed by ‘WiFi Got I.P.’

My reason for wanting to use a UNO (of which I have several spares) instead of a ESP8266-12E is that the UNO has more analogs for my application.

Thanks to all those who responded to my initial problem.

1 Like

Thanks for posting your solution, really helps out the community!

scusate, purtroppo il mio arduino co esp01 continua a nn accettare lo sketch…sto utilizzando il traduttore per capirci qualcosa…però non capisco la soluzione… qualcuno puo aiutarmi?

Hi bro I have an Arduino uno connected to some actuators & sensors of my aquarium now I bouth an ESP 01 and I want to use it and use cayenne to control it. I wanted to follow the steps you describe. However when I start cayenne and select arduino tehre is no token the are MQTT data.

try this Uno + ESP8266 + Cayenne - #2 by shramik_salgaonkar

This method is now deprecated. You need to use the new MQTT method. There are examples in the forum and this is also now supported by the Cayenne libs.

If you don’t find anything that works, I’ll chime in later in the week. Just getting back to it after labour day long weekend.



Is there any way to do it stable with the UNO? I don’t would like to avoid buy a Mega

you can use it and it will work. But do not use any serial print.

I will do something almost equal to this project. Tanker - A IoT Aquarium. But I won’t use display only my smartphone.

yes it will work, you are including Dallas 18B20 waterproof temp probe and a ph sensor?

only dallas sensor. my budget is limited rigth now probably I will include PH in another aquarium later.

combine dallas code with the code the code i linked above.

i will also include dimming led, automatic feeder one fan for the led & the filter.

you can add as many sensor till you have pins on your arduini uno available.