My Wifi-Shield wont connenct to the Internet?

Do you have AT firmware in your ESP?

I dont know what you mean?
I installed all librarys i think

@kreggly ok wait i followed this guide to flash the shield itself to see if it works: Guide

Now the Shield without the Arduino is connected to the WiFi.

But i dont think it works this way with cayenne?..

I also have the same problem using the ESP8266 Nodemcu with arduino Mega. The shield works perfectly because I can load simple codes directly to the shield and from the serial monitor it responds but when I try the above sketch it doesn’t even compile continuous error as below;

C:\Users\HP\Documents\Arduino\libraries\Cayenne-MQTT-Arduino-master\src/CayenneMQTTESP8266Shield.h:36:2: error: #error This code is not intended to run on the ESP8266 platform! Please check your Tools->Board setting.

_ #error This code is not intended to run on the ESP8266 platform! Please check your Tools->Board setting._

_ ^_

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

Can someone help me with this error?

Eric

I can compile it (to the Arduino) but when the shield is on top of the Arduino you have to select the Arduino as Microcontroller and not the NodeMCU 1.0 (ESP-12E Module) :slight_smile:

It works to compile but the shield don’t connect to the WiFi…

I think something is missing or the shield isn’t “talking” properly with the Arduino…
I have absolutely no clue

Node MCU firmware is not compatible with the ESP Shield Library. If you want to use the shield here, you need to reprogram it with an AT compatible firmware.

You can follow steps 7-13 from this link with your serial dongle. Pay particular attention to step 7. I want to see your best dance moves.

Cheers,

Craig

Oh nice thx i will try it out and post here if i was successful :slight_smile:

@kreggly no way out using my adafruit board i now have the following error anyway to solve this?

C:\Users\HP\Documents\Arduino\libraries\ESP8266SerialLibrary\ESP8266.cpp:22:26: fatal error: avr/pgmspace.h: No such file or directory

_ #include <avr/pgmspace.h>_

_ ^_

compilation terminated.

exit status 1
Error compiling for board Adafruit HUZZAH ESP8266.

thanks for any help on this

@njueric,

If you have an Adafruit Huzzah, then this is not the sketch you’re looking for. <>Place Star Wars meme here<>

The library you are referencing in this sketch only applies to AVR boards like the Uno or Mega.

You need this one:

Cayenne-MQTT-Arduino/ESP8266.ino at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub

Cheers,

Craig

@njueric follow this Adding a New Device using MQTT

…or that :stuck_out_tongue:

WOW @kreggly you are truly the best!!!

I flashed the AT-Firmware with the guide you postet and uploadet the sketch to my Arduino you postet bevor and it works!
My Arduino is connected to the WiFi and i see the temporary widget in the Dashboard.

THX! :smile: :blush:

2 Likes

Ahem. I believe step 7 requires I see some dance moves… LOL.

Cheers,

Craig

1 Like

@kreggly thanks for the advice, I succeeded actually in using the sketch you posted above. I wasn’t actually clear with my error; the problem I’m facing is connecting my arduino mega to cayenne using the adafruit or nodemcu shields. Both shields give an error, the same error avr.
Is there any other way to connect the arduino mega to cayenne using the shield? Any guides?
Thanks in advance for your generous help. I’ve been googling all day.

@shramik_salgaonkar thanks, already used this and it doesn’t even compile, stops at avr error, may it’s only me. The problem is that it doesn’t even compile not to mention loading, there should be something that I’m missing, I’ve installed all possible libraries. A little bit frustrated :disappointed: I’ve to move my board to a position that I need only wifi no lan.

select arduino mega board in tools > boards > arduino mega.
connect your esp to serial 1 pins on your mega.
follow step 1 in properly in Cayenne-MQTT-Arduino/ESP8266Shield.ino at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub

@njueric,

Ok, so compiling and programming the Mega with the ESPShield sketch is successful? And you are having problems programming the shields, correct? And your intention is to use the ESP as a shield on the Mega?

What are you programming the ESPs with? Note that you need to program the shields with an AT command firmware. That might be the issue.

Cheers,

Craig

@kreggly hi once more, below you’ll find the results of what i have trying to compile ESP8266 in Arduino IDE.

Arduino Compile example ESP8266
_Archiving built core (caching) in: C:\Users\HP\AppData\Local\Temp\arduino_cache_179205\core_
core_esp8266_esp8266_huzzah_CpuFrequency_80,UploadSpeed_115200,FlashSize_4M1M_23389078ed712a9cdacb703d60a0f757.a
Sketch uses 276011 bytes (26%) of program storage space. Maximum is 1044464 bytes.
Global variables use 35420 bytes (43%) of dynamic memory, leaving 46500 bytes for local variables. Maximum is 81920 bytes.

Arduino Compile example ESP8266Shield
C:\Users\HP\Documents\Arduino\libraries\ESP8266SerialLibrary\ESP8266.cpp:22:26: fatal error: avr/pgmspace.h: No such file or directory

_ #include <avr/pgmspace.h>_
_ ^_
compilation terminated.
exit status 1
Error compiling for board Adafruit HUZZAH ESP8266.

Hope it’s clear now. My main problem is that i can’t compile the above example in the Arduino IDE.

exit status 1
Error compiling for board Adafruit HUZZAH ESP8266.

The ESPShield sketch is for an AVR series board like the Uno or the Mega. You cannot put it in a Huzzah which is an ESP.

If you are intending to put this in a Mega, select the Mega board from the drop down boards menu and recompile.

Craig