Not connecting arduino uno ESP8226 with cayenne


#1

Hi
I’m trying to connect my arduino uno with the ESP8226 module to cayenne, copied the text gave to me by cayenne, and when compile before sending it to the arduino, it appears this error:

/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/utility/wifi_drv.cpp: In static member function ‘static uint8_t WiFiDrv::getEncTypeNetowrks(uint8_t)’:
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/utility/wifi_drv.cpp:451:10: warning: converting to non-pointer type ‘uint8_t {aka unsigned char}’ from NULL [-Wconversion-null]
return NULL;
^
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/utility/wifi_drv.cpp: In static member function ‘static int32_t WiFiDrv::getRSSINetoworks(uint8_t)’:
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/utility/wifi_drv.cpp:476:10: warning: converting to non-pointer type ‘int32_t {aka long int}’ from NULL [-Wconversion-null]
return NULL;
^

How can I resolve it or what is it?

Thanks


#2

Hi @dsalzedo,

These look like compiler warnings related to non-Cayenne Arduino files. I’d probably not worry about them since with just warnings and not errors you should still be able to upload the code to the Arduino.


#3

Hi, thanks for the reply.

It uploads the code to the arduino, but at cayenne dashboard appears “Waiting for board to connect…” once the code is uploaded.
Furthermore, at serial monitor appears “[13] WiFi shield not present” and the ESP8226 is connected with the leds shinning.


#4

I think I see what might be up here. Are you using one of these WiFi Shield sketch files from the Cayenne UI?

If so, those are for the Arduino WiFi Shield and Arduino WiFi 101 Shield respectively. None of the sketches in the Cayenne UI are designed for an ESP8266 to be used as a shield for another Arduino.

Don’t let this discourage you from using Cayenne for your project, however. We have lots of users using ESP8266 sketches for Cayenne that @kreggly has shared on this forum. I believe you’re looking for this since you’re going to use the ESP8266 as the shield for your Uno. Alternatively, (and more popularly), lots of users are using just the ESP8266 on it’s own for their projects, see this post for a How-To and more information.

We are working on official ESP8266 support and expect it in Q2 of this year, then you’ll see ESP8266 options in the UI and won’t have to go digging through forum posts for this popular device anymore. :slight_smile:


#5

Bumping this old thread to share that we’ve just provided support in our MQTT Arduino library for using ESP8266 as a shield :slight_smile: We’ve done basic testing and works well. Give it a try for your project and let us know how it works out for you !

Here is the updated library on our github:

and the code can be found here: