I want to control Neopixel leds by using Cayenne through a Chrome browser on a PC.
I have an Uno board and an Adicore Esp8266-01 wifi module board. I haven’t used the Esp8266 board before.
I have existing code and libraries that define led color animations that I currently run from the Uno. How would I set up my system to utilize Cayenne to provide control inputs to the sketch that controls the leds?
It is possible, however I need to test it better myself. It relies on the ESP having the NodeMCU/AT firmware.
Thanks. Would I just choose the WIFI shield sketch in this case? Or would I use the manual sketch? I assume I would wire the Rx and Tx of the module to the Uno.
Busy week for me.
I have a solution that compiles, and want to put together a how-to to use the esp8266 as a shield.
I hope to have time this weekend.
I can confirm that this howto works.
If you are using the ESP8266 as a Wifi shield with the AT command set installed on the ESP, and the Uno as the host, then this will not work.
@adam is talking about overwriting the flash in the ESP module itself so you don’t even need an Uno.
Connect your Uno serial port RX to TX and TX to RX on the ESP. Note that the ESP pins are 5V tolerant, but if you want to be nice, put a 1K resistor inline between the Uno TX and the ESP RX. Also note that the ESP supply must be 3.3V. If you put 5V there,…
This code is again not yet officially supported by Cayenne, so let me know and the community can help you.
Note, when you upload to the UNO, you will want to disconnect the Arduino RX line otherwise you can’t program the UNO because the ESP and the IDE are both trying to drive the same line.
Bumping this old thread to share that we’ve just provided support in our MQTT Arduino library for using ESP8266 as a shield
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:
This file has been truncated.
This sketch connects to the Cayenne server using an ESP8266 WiFi module as a shield connected via a hardware serial to an Arduino.
The CayenneMQTT Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.
1. Install the ESP8266SerialLibrary.zip library via the Arduino IDE (Sketch->Include Library->Add .ZIP Library) from the Cayenne extras/libraries
folder (e.g. My Documents\Arduino\libraries\CayenneMQTT\extras\libraries) to compile this example.
2. Connect the ESP8266 as a shield to your Arduino. This example uses the Serial1 hardware serial pins available on the Mega. You can also try
using a software serial, though it may be less stable.
3. Set the Cayenne authentication info to match the authentication info from the Dashboard.
4. Set the network name and password.
5. Compile and upload the sketch.
6. A temporary widget will be automatically generated in the Cayenne Dashboard. To make the widget permanent click the plus sign on the widget.
NOTE: This code requires ESP8266 firmware version 1.0.0 (AT v0.22) or later.
//#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
Install the ESP8266SerialLibrary.zip library via the Arduino IDE (Sketch->Include Library->Add .ZIP Library) from the Cayenne extras/libraries folder (e.g. My Documents\Arduino\libraries\CayenneMQTT\extras\libraries) to compile this example
i already install ESP8266SerialLibrary.zip
but when i try
still not such file or directory
are there files present inside the folder?
yup, the CayenneMQTTESP8266Shield.h inside the folder
and still like this
this file inside ESP8266SerialLibrary Folder
sorry sir im new in arduino and cayenne,
in need connect to Cayenne platform for my Final Exam
Have you tried deleting all Cayenne libraries and reinstalling?
@adam this issue was solved by doing the same thing you suggested but in PM.