Wemos D1 ESP8266 based - Works with Cayenne?


Hello Guys,

The attached code works fine when using the Arduino UNO and ESP8266 board attached to it (RX to TX and TX to RX)… Now I am trying to make it work with Wemos D1 board (which doenst use the Arduino but just the ESP8266 module) but I have the following error message when trying to compile the sketch…

Arduino: 1.8.3 (Windows 7), Board: “ESPino (ESP-12 Module), 80 MHz, DIO, 115200, 4M (1M SPIFFS), ck”

Build options changed, rebuilding all
C:\Program Files (x86)\Arduino\libraries\ESP8266HardwareSerial\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 ESPino (ESP-12 Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Code.txt (588 Bytes)


Hello, Can you try to include and recompile the code with this:

#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"



Yep. If you want to use the Wemos D1 as standalone without any other micro like a Uno, etc, then you need to run different code.

I suggest you run the supported MQTT code by going to the Dashboard and creating a new Generic ESP8266 entry, and compiling this code. I suggest you compile as a Generic ESP board also. https://github.com/myDevicesIoT/Cayenne-MQTT-ESP8266/blob/master/examples/ESP8266/ESP8266.ino

If you still want to use the Blynk Method, search Standalone ESP in the forum for the code.




ognqn.chikov Thank you, but didnt work…


@kreggly I tried both, and the Blynk Method is much easier… Thank you, it is working now.