Supposedly, ESP NOW will run on ESP8266 as well as ESP32 with ESP-NOW.
However, esp_now.h is not included under the ESP8266 library (Arduino15/Packages/ESP8266/etc). Therefore #include <esp_now.h> fails to compile since it can’t find the file.
It is available for ESP32. A #include to the ESP32 file, giving it the entire path, now fails to compile saying: Error compiling for board NodeMCU 1.0 (ESP-12E Module). Obviously, the ESP32 version will not work for ESP8266.
Any ideas, Thanks
Hi.
I’ve recently finish a tutorial about ESP-NOW with the ESP8266. It will be published next week.
You don’t need to install anything. Just make sure you import the wifi library before espnow, as follows:
#include <ESP8266WiFi.h> #include <espnow.h>
Then, you need to make a few modifications to make it work with the ESP8266, but I think you may be able to find out.
I’ll share a link to the tutorial, as soon as it is published.
Regards,
Sara
Hi.
Here’s the tutorial about ESP-NOW on the ESP8266: ESP-NOW with ESP8266 – Getting Started
I hope this is useful.
Regards,
Sara